Opened 15 months ago
#68042 new defect
libmatheval tests fail to build with guile-2.2 (while guile18 is itself broken): matheval: error: conflicting types for ‘scm_t_bits’
Reported by: | barracuda156 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | libmatheval |
Description
Currently libmatheval
is set to use guile18
, however that version is just broken for years: #48690
I tried to switch it to guile2
(what is currently guile
, until my PR with guile3
merged).
However, that fails.
With gcc-4.2:
:info:build Making all in tests :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_libmatheval/libmatheval/work/libmatheval-1.1.11/tests' :info:build /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I.. -I../lib -I/opt/local/include -D_THREAD_SAFE -I/opt/local/include/guile/2.2 -pipe -Os -arch ppc -MT matheval-matheval.o -MD -MP -MF .deps/matheval-matheval.Tpo -c -o matheval-matheval.o `test -f 'matheval.c' || echo './'`matheval.c :info:build matheval.c:30: error: conflicting types for ‘scm_t_bits’ :info:build /opt/local/include/guile/2.2/libguile/tags.h:65: error: previous declaration of ‘scm_t_bits’ was here :info:build matheval.c:37:2: error: #error Neither scm_num2dbl() nor SCM_NUM2DBL available :info:build matheval.c:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘evaluator_destroy_scm’ :info:build matheval.c: In function ‘inner_main’: :info:build matheval.c:76: error: ‘evaluator_destroy_scm’ undeclared (first use in this function) :info:build matheval.c:76: error: (Each undeclared identifier is reported only once :info:build matheval.c:76: error: for each function it appears in.) :info:build matheval.c:107: warning: implicit declaration of function ‘scm_makfrom0str’ :info:build matheval.c:107: warning: passing argument 1 of ‘scm_primitive_load’ makes pointer from integer without a cast :info:build matheval.c: At top level: :info:build matheval.c:126: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘evaluator_destroy_scm’ :info:build matheval.c: In function ‘evaluator_create_scm’: :info:build matheval.c:144: warning: implicit declaration of function ‘SCM_STRINGP’ :info:build matheval.c:148: warning: implicit declaration of function ‘SCM_LENGTH’ :info:build matheval.c:149: warning: implicit declaration of function ‘SCM_CHARS’ :info:build matheval.c:149: warning: passing argument 2 of ‘__builtin___memcpy_chk’ makes pointer from integer without a cast :info:build matheval.c:149: warning: passing argument 2 of ‘__inline_memcpy_chk’ makes pointer from integer without a cast :info:build matheval.c: In function ‘evaluator_evaluate_scm’: :info:build matheval.c:177: warning: implicit declaration of function ‘SCM_INUMP’ :info:build matheval.c:180: warning: implicit declaration of function ‘SCM_INUM’ :info:build matheval.c:189: warning: passing argument 2 of ‘__builtin___memcpy_chk’ makes pointer from integer without a cast :info:build matheval.c:189: warning: passing argument 2 of ‘__inline_memcpy_chk’ makes pointer from integer without a cast :info:build matheval.c:201: warning: implicit declaration of function ‘scm_num2dbl’ :info:build matheval.c:213: warning: implicit declaration of function ‘scm_make_real’ :info:build matheval.c:213: warning: return makes pointer from integer without a cast :info:build matheval.c: In function ‘evaluator_get_string_scm’: :info:build matheval.c:226: warning: return makes pointer from integer without a cast :info:build matheval.c: In function ‘evaluator_get_variables_scm’: :info:build matheval.c:249: warning: implicit declaration of function ‘scm_listify__GONE__REPLACE_WITH__scm_list_n’ :info:build matheval.c:252: warning: passing argument 1 of ‘scm_append_x’ makes pointer from integer without a cast :info:build matheval.c: In function ‘evaluator_derivative_scm’: :info:build matheval.c:267: warning: passing argument 2 of ‘evaluator_derivative’ makes pointer from integer without a cast :info:build matheval.c: In function ‘evaluator_evaluate_x_scm’: :info:build matheval.c:284: warning: return makes pointer from integer without a cast :info:build matheval.c: In function ‘evaluator_evaluate_x_y_scm’: :info:build matheval.c:301: warning: return makes pointer from integer without a cast :info:build matheval.c: In function ‘evaluator_evaluate_x_y_z_scm’: :info:build matheval.c:323: warning: return makes pointer from integer without a cast :info:build make[2]: *** [matheval-matheval.o] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_libmatheval/libmatheval/work/libmatheval-1.1.11/tests' :info:build make[1]: *** [all-recursive] Error 1
With gcc12:
:info:build Making all in tests :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_libmatheval/libmatheval/work/libmatheval-1.1.11/tests' :info:build /opt/local/bin/gcc-mp-12 -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I.. -I../lib -I/opt/local/include -D_THREAD_SAFE -I/opt/local/include/guile/2.2 -pipe -Os -arch ppc -MT matheval-matheval.o -MD -MP -MF .deps/matheval-matheval.Tpo -c -o matheval-matheval.o `test -f 'matheval.c' || echo './'`matheval.c :info:build matheval.c:30:17: error: conflicting types for 'scm_t_bits'; have 'long int' :info:build 30 | typedef long scm_t_bits; :info:build | ^~~~~~~~~~ :info:build In file included from /opt/local/include/guile/2.2/libguile/__scm.h:398, :info:build from /opt/local/include/guile/2.2/libguile.h:31, :info:build from matheval.c:25: :info:build /opt/local/include/guile/2.2/libguile/tags.h:65:23: note: previous declaration of 'scm_t_bits' with type 'scm_t_bits' {aka 'long unsigned int'} :info:build 65 | typedef scm_t_uintptr scm_t_bits; :info:build | ^~~~~~~~~~ :info:build matheval.c:37:2: error: #error Neither scm_num2dbl() nor SCM_NUM2DBL available :info:build 37 | #error Neither scm_num2dbl() nor SCM_NUM2DBL available :info:build | ^~~~~ :info:build In file included from /opt/local/include/guile/2.2/libguile.h:128: :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:121:19: error: unknown type name 'scm_sizet__GONE__REPLACE_WITH__size_t' :info:build 121 | #define scm_sizet scm_sizet__GONE__REPLACE_WITH__size_t :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:121:19: note: in definition of macro 'scm_sizet' :info:build 121 | #define scm_sizet scm_sizet__GONE__REPLACE_WITH__size_t :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build matheval.c: In function 'inner_main': :info:build matheval.c:76:42: warning: passing argument 2 of 'scm_set_smob_free' from incompatible pointer type [-Wincompatible-pointer-types] :info:build 76 | scm_set_smob_free(evaluator_tag, evaluator_destroy_scm); :info:build | ^~~~~~~~~~~~~~~~~~~~~ :info:build | | :info:build | int (*)(struct scm_unused_struct *) :info:build In file included from /opt/local/include/guile/2.2/libguile.h:94: :info:build /opt/local/include/guile/2.2/libguile/smob.h:183:57: note: expected 'size_t (*)(struct scm_unused_struct *)' {aka 'long unsigned int (*)(struct scm_unused_struct *)'} but argument is of type 'int (*)(struct scm_unused_struct *)' :info:build 183 | SCM_API void scm_set_smob_free (scm_t_bits tc, size_t (*free) (SCM)); :info:build | ~~~~~~~~~^~~~~~~~~~~ :info:build matheval.c:107:28: warning: implicit declaration of function 'scm_makfrom0str'; did you mean 'scm_makfromstrs'? [-Wimplicit-function-declaration] :info:build 107 | scm_primitive_load(scm_makfrom0str(argv[1])); :info:build | ^~~~~~~~~~~~~~~ :info:build | scm_makfromstrs :info:build matheval.c:107:28: warning: passing argument 1 of 'scm_primitive_load' makes pointer from integer without a cast [-Wint-conversion] :info:build 107 | scm_primitive_load(scm_makfrom0str(argv[1])); :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~ :info:build | | :info:build | int :info:build In file included from /opt/local/include/guile/2.2/libguile.h:73: :info:build /opt/local/include/guile/2.2/libguile/load.h:31:37: note: expected 'SCM' {aka 'struct scm_unused_struct *'} but argument is of type 'int' :info:build 31 | SCM_API SCM scm_primitive_load (SCM filename); :info:build | ~~~~^~~~~~~~ :info:build matheval.c: At top level: :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:121:19: error: unknown type name 'scm_sizet__GONE__REPLACE_WITH__size_t' :info:build 121 | #define scm_sizet scm_sizet__GONE__REPLACE_WITH__size_t :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:121:19: note: in definition of macro 'scm_sizet' :info:build 121 | #define scm_sizet scm_sizet__GONE__REPLACE_WITH__size_t :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build matheval.c: In function 'evaluator_create_scm': :info:build matheval.c:145:23: warning: implicit declaration of function 'SCM_STRINGP'; did you mean 'SCM_STRINGS_H'? [-Wimplicit-function-declaration] :info:build 145 | && SCM_STRINGP(string), string, SCM_ARG1, :info:build | ^~~~~~~~~~~ :info:build /opt/local/include/guile/2.2/libguile/__scm.h:109:43: note: in definition of macro 'SCM_UNLIKELY' :info:build 109 | #define SCM_UNLIKELY(_expr) SCM_EXPECT ((_expr), 0) :info:build | ^~~~~ :info:build matheval.c:144:9: note: in expansion of macro 'SCM_ASSERT' :info:build 144 | SCM_ASSERT(SCM_NIMP(string) :info:build | ^~~~~~~~~~ :info:build matheval.c:148:36: warning: implicit declaration of function 'SCM_LENGTH' [-Wimplicit-function-declaration] :info:build 148 | stringz = (char *) malloc((SCM_LENGTH(string) + 1) * sizeof(char)); :info:build | ^~~~~~~~~~ :info:build In file included from /usr/include/string.h:148, :info:build from matheval.c:23: :info:build matheval.c:149:25: warning: implicit declaration of function 'SCM_CHARS'; did you mean 'SCM_CHAR'? [-Wimplicit-function-declaration] :info:build 149 | memcpy(stringz, SCM_CHARS(string), SCM_LENGTH(string)); :info:build | ^~~~~~~~~ :info:build matheval.c:149:25: warning: passing argument 2 of '__builtin___memcpy_chk' makes pointer from integer without a cast [-Wint-conversion] :info:build 149 | memcpy(stringz, SCM_CHARS(string), SCM_LENGTH(string)); :info:build | ^~~~~~~~~~~~~~~~~ :info:build | | :info:build | int :info:build matheval.c:149:25: note: expected 'const void *' but argument is of type 'int' :info:build matheval.c:149:25: warning: passing argument 2 of '__inline_memcpy_chk' makes pointer from integer without a cast [-Wint-conversion] :info:build 149 | memcpy(stringz, SCM_CHARS(string), SCM_LENGTH(string)); :info:build | ^~~~~~~~~~~~~~~~~ :info:build | | :info:build | int :info:build /usr/include/secure/_string.h:56:48: note: expected 'const void *' but argument is of type 'int' :info:build 56 | __inline_memcpy_chk (void *__dest, const void *__src, size_t __len) :info:build | ~~~~~~~~~~~~^~~~~ :info:build matheval.c: In function 'evaluator_evaluate_scm': :info:build matheval.c:177:20: warning: implicit declaration of function 'SCM_INUMP'; did you mean 'SCM_INUM1'? [-Wimplicit-function-declaration] :info:build 177 | SCM_ASSERT(SCM_INUMP(count), count, SCM_ARG2, :info:build | ^~~~~~~~~ :info:build /opt/local/include/guile/2.2/libguile/__scm.h:109:43: note: in definition of macro 'SCM_UNLIKELY' :info:build 109 | #define SCM_UNLIKELY(_expr) SCM_EXPECT ((_expr), 0) :info:build | ^~~~~ :info:build matheval.c:177:9: note: in expansion of macro 'SCM_ASSERT' :info:build 177 | SCM_ASSERT(SCM_INUMP(count), count, SCM_ARG2, :info:build | ^~~~~~~~~~ :info:build matheval.c:180:39: warning: implicit declaration of function 'SCM_INUM'; did you mean 'SCM_INUM1'? [-Wimplicit-function-declaration] :info:build 180 | names_copy = (char **) malloc(SCM_INUM(count) * sizeof(char *)); :info:build | ^~~~~~~~ :info:build | SCM_INUM1 :info:build matheval.c:189:39: warning: passing argument 2 of '__builtin___memcpy_chk' makes pointer from integer without a cast [-Wint-conversion] :info:build 189 | memcpy(names_copy[i], SCM_CHARS(SCM_CAR(name)), :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~ :info:build | | :info:build | int :info:build matheval.c:189:39: note: expected 'const void *' but argument is of type 'int' :info:build matheval.c:189:39: warning: passing argument 2 of '__inline_memcpy_chk' makes pointer from integer without a cast [-Wint-conversion] :info:build 189 | memcpy(names_copy[i], SCM_CHARS(SCM_CAR(name)), :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~ :info:build | | :info:build | int :info:build /usr/include/secure/_string.h:56:48: note: expected 'const void *' but argument is of type 'int' :info:build 56 | __inline_memcpy_chk (void *__dest, const void *__src, size_t __len) :info:build | ~~~~~~~~~~~~^~~~~ :info:build matheval.c:201:21: warning: implicit declaration of function 'scm_num2dbl' [-Wimplicit-function-declaration] :info:build 201 | scm_num2dbl(SCM_CAR(value), "evaluator-evaluate"); :info:build | ^~~~~~~~~~~ :info:build matheval.c:213:16: warning: implicit declaration of function 'scm_make_real'; did you mean 'scm_make_array'? [-Wimplicit-function-declaration] :info:build 213 | return scm_make_real(result); :info:build | ^~~~~~~~~~~~~ :info:build | scm_make_array :info:build matheval.c:213:16: warning: returning 'int' from a function with return type 'SCM' {aka 'struct scm_unused_struct *'} makes pointer from integer without a cast [-Wint-conversion] :info:build 213 | return scm_make_real(result); :info:build | ^~~~~~~~~~~~~~~~~~~~~ :info:build matheval.c: In function 'evaluator_get_string_scm': :info:build matheval.c:225:13: warning: returning 'int' from a function with return type 'SCM' {aka 'struct scm_unused_struct *'} makes pointer from integer without a cast [-Wint-conversion] :info:build 225 | scm_makfrom0str(evaluator_get_string :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 226 | ((void *) SCM_CDR(evaluator_smob))); :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build matheval.c: In function 'evaluator_get_variables_scm': :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:115:21: warning: implicit declaration of function 'scm_listify__GONE__REPLACE_WITH__scm_list_n' [-Wimplicit-function-declaration] :info:build 115 | #define scm_listify scm_listify__GONE__REPLACE_WITH__scm_list_n :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:115:21: note: in definition of macro 'scm_listify' :info:build 115 | #define scm_listify scm_listify__GONE__REPLACE_WITH__scm_list_n :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:115:21: warning: passing argument 1 of 'scm_append_x' makes pointer from integer without a cast [-Wint-conversion] :info:build 115 | #define scm_listify scm_listify__GONE__REPLACE_WITH__scm_list_n :info:build /opt/local/include/guile/2.2/libguile/deprecated.h:115:21: note: in definition of macro 'scm_listify' :info:build 115 | #define scm_listify scm_listify__GONE__REPLACE_WITH__scm_list_n :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build In file included from /opt/local/include/guile/2.2/libguile.h:72: :info:build /opt/local/include/guile/2.2/libguile/list.h:46:31: note: expected 'SCM' {aka 'struct scm_unused_struct *'} but argument is of type 'int' :info:build 46 | SCM_API SCM scm_append_x (SCM args); :info:build | ~~~~^~~~ :info:build matheval.c: In function 'evaluator_derivative_scm': :info:build matheval.c:270:49: warning: passing argument 2 of 'evaluator_derivative' makes pointer from integer without a cast [-Wint-conversion] :info:build 270 | SCM_CHARS(name))); :info:build | ^~~~~~~~~~~~~~~ :info:build | | :info:build | int :info:build /opt/local/include/guile/2.2/libguile/smob.h:103:43: note: in definition of macro 'SCM_RETURN_NEWSMOB' :info:build 103 | return scm_new_smob ((tc), (scm_t_bits)(data)) :info:build | ^~~~ :info:build In file included from matheval.c:26: :info:build ../lib/matheval.h:73:69: note: expected 'char *' but argument is of type 'int' :info:build 73 | extern void *evaluator_derivative(void *evaluator, char *name); :info:build | ~~~~~~^~~~ :info:build matheval.c: In function 'evaluator_evaluate_x_scm': :info:build matheval.c:282:13: warning: returning 'int' from a function with return type 'SCM' {aka 'struct scm_unused_struct *'} makes pointer from integer without a cast [-Wint-conversion] :info:build 282 | scm_make_real(evaluator_evaluate_x :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 283 | ((void *) SCM_CDR(evaluator_smob), :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 284 | scm_num2dbl(x, "evaluator-evaluate-x"))); :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build matheval.c: In function 'evaluator_evaluate_x_y_scm': :info:build matheval.c:298:13: warning: returning 'int' from a function with return type 'SCM' {aka 'struct scm_unused_struct *'} makes pointer from integer without a cast [-Wint-conversion] :info:build 298 | scm_make_real(evaluator_evaluate_x_y :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 299 | ((void *) SCM_CDR(evaluator_smob), :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 300 | scm_num2dbl(x, "evaluator-evaluate-x-y"), :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 301 | scm_num2dbl(y, "evaluator-evaluate-x-y"))); :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build matheval.c: In function 'evaluator_evaluate_x_y_z_scm': :info:build matheval.c:319:13: warning: returning 'int' from a function with return type 'SCM' {aka 'struct scm_unused_struct *'} makes pointer from integer without a cast [-Wint-conversion] :info:build 319 | scm_make_real(evaluator_evaluate_x_y_z :info:build | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 320 | ((void *) SCM_CDR(evaluator_smob), :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 321 | scm_num2dbl(x, "evaluator-evaluate-x-y-z"), :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 322 | scm_num2dbl(y, "evaluator-evaluate-x-y-z"), :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 323 | scm_num2dbl(z, "evaluator-evaluate-x-y-z"))); :info:build | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build make[2]: *** [matheval-matheval.o] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_libmatheval/libmatheval/work/libmatheval-1.1.11/tests' :info:build make[1]: *** [all-recursive] Error 1
Note: See
TracTickets for help on using
tickets.