Skip to content

Conversation

Leonidas-from-XIV
Copy link
Contributor

@Leonidas-from-XIV Leonidas-from-XIV commented Apr 17, 2025

Related to #27771, guile.1.0 seems to also have an issue building on systems that ship with GCC 14.

FTBFS with a failure like this:

File "stubgen/dune", lines 12-16, characters 0-263: 12 | (rule (targets bindings_stubs_gen.exe)
13 |  (deps bindings_stubs_gen.c c_flags c_library_flags) 14 |  (action
15 |   (bash
16 |     "%{cc} bindings_stubs_gen.c -I `dirname %{lib:ctypes:ctypes_cstubs_internals.h}` -I %{ocaml_where} $(< c_flags) $(< c_library_flags) -o %{targets}")))
(cd _build/default/stubgen && /usr/bin/bash -e -u -o pipefail -c 'gcc -O2 -fno-strict-aliasing -fwrapv -fPIC -pthread -D_FILE_OFFSET_BITS=64 -Wall -fdiagnostics-color=always bindings_stubs_gen.c -I `dirname ../../_private/default/.pkg/ctypes/target/lib/ctypes/ctypes_cstubs_internals.h` -I /home/opam/.cache/dune/toolchains/ocaml-compiler.5.3.0-128080a60f158774bfad0f37dcf62390/target/lib/ocaml $(< c_flags) $(< c_library_flags) -o bindings_stubs_gen.exe')
bindings_stubs_gen.c: In function 'main':
bindings_stubs_gen.c:35:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   35 |      enum { check_SCM_UNDEFINED_const = (int)SCM_UNDEFINED };
      |                                         ^
bindings_stubs_gen.c:36:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   36 |      intptr_t v = (SCM_UNDEFINED);
      |                   ^
bindings_stubs_gen.c:42:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   42 |      enum { check_SCM_EOL_const = (int)SCM_EOL };
      |                                   ^
bindings_stubs_gen.c:43:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   43 |      intptr_t v = (SCM_EOL);
      |                   ^
bindings_stubs_gen.c:49:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   49 |      enum { check_SCM_BOOL_T_const = (int)SCM_BOOL_T };
      |                                      ^
bindings_stubs_gen.c:50:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   50 |      intptr_t v = (SCM_BOOL_T);
      |                   ^
bindings_stubs_gen.c:56:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   56 |      enum { check_SCM_BOOL_F_const = (int)SCM_BOOL_F };
      |                                      ^
bindings_stubs_gen.c:57:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   57 |      intptr_t v = (SCM_BOOL_F);
      |                   ^

FTBFS with a failure like this:

File "stubgen/dune", lines 12-16, characters 0-263:
12 | (rule (targets bindings_stubs_gen.exe)
13 |  (deps bindings_stubs_gen.c c_flags c_library_flags)
14 |  (action
15 |   (bash
16 |     "%{cc} bindings_stubs_gen.c -I `dirname %{lib:ctypes:ctypes_cstubs_internals.h}` -I %{ocaml_where} $(< c_flags) $(< c_library_flags) -o %{targets}")))
(cd _build/default/stubgen && /usr/bin/bash -e -u -o pipefail -c 'gcc -O2 -fno-strict-aliasing -fwrapv -fPIC -pthread -D_FILE_OFFSET_BITS=64 -Wall -fdiagnostics-color=always bindings_stubs_gen.c -I `dirname ../../_private/default/.pkg/ctypes/target/lib/ctypes/ctypes_cstubs_internals.h` -I /home/opam/.cache/dune/toolchains/ocaml-compiler.5.3.0-128080a60f158774bfad0f37dcf62390/target/lib/ocaml $(< c_flags) $(< c_library_flags) -o bindings_stubs_gen.exe')
bindings_stubs_gen.c: In function 'main':
bindings_stubs_gen.c:35:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   35 |      enum { check_SCM_UNDEFINED_const = (int)SCM_UNDEFINED };
      |                                         ^
bindings_stubs_gen.c:36:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   36 |      intptr_t v = (SCM_UNDEFINED);
      |                   ^
bindings_stubs_gen.c:42:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   42 |      enum { check_SCM_EOL_const = (int)SCM_EOL };
      |                                   ^
bindings_stubs_gen.c:43:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   43 |      intptr_t v = (SCM_EOL);
      |                   ^
bindings_stubs_gen.c:49:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   49 |      enum { check_SCM_BOOL_T_const = (int)SCM_BOOL_T };
      |                                      ^
bindings_stubs_gen.c:50:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   50 |      intptr_t v = (SCM_BOOL_T);
      |                   ^
bindings_stubs_gen.c:56:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   56 |      enum { check_SCM_BOOL_F_const = (int)SCM_BOOL_F };
      |                                      ^
bindings_stubs_gen.c:57:19: error: initialization of 'intptr_t' {aka 'long int'} from 'struct scm_unused_struct *' makes integer from pointer without a cast [-Wint-conversion]
   57 |      intptr_t v = (SCM_BOOL_F);
      |                   ^
@Leonidas-from-XIV
Copy link
Contributor Author

Upstream issue: kiranandcode/guile-ocaml#3

@Leonidas-from-XIV
Copy link
Contributor Author

@shonfeder What kind of reporter action is expected from me?

@Leonidas-from-XIV
Copy link
Contributor Author

Leonidas-from-XIV commented Jun 5, 2025

I thought your comment on #27772 (comment) was indicating that you wanted that issue fixed before publishing this.

Ah. No, I don't think that can be solved with a metadata change, it probably needs a medium-sized patch to get working. Or a conf package where one could specify conf-gcc < 14.

I assume the macOS failures mean that brew now also ships with GCC >= 14 and needs to be marked as unavailable…

There is no way to exclude versions in homebrew because it is a rolling
release so its just all of them for now.
@Leonidas-from-XIV
Copy link
Contributor Author

I've excluded macOS but CI fails because of Curl failing to download the tarball. I can download the tarball fine on my machine so I assume it's some CI issue (or Github blocking CI or something of that sort).

@shonfeder
Copy link
Contributor

See discussion at #27771 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants