You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ffi008:
Error: test/ffi008
ld: /tmp/guix-build-idris-1.3.3.drv-0/ccmIt9AI.o:(.bss.mystruct+0x0): multiple definition of `mystruct'; /tmp/guix-build-idris-1.3.3.drv-0/cc3UDCaU.o:(.bss.mystruct+0x0): first defined here
collect2: error: ld returned 1 exit status
run.sh: line 3: ./ffi008: No such file or directory
FAIL (8.87s)
--- test/ffi008/output 2022-04-13 04:43:20.294548527 +0000
+++ test/ffi008/expected.out 1970-01-01 00:00:01.000000000 +0000
@@ -1 +1,5 @@
-FAILURE: "gcc" ["-fwrapv","-fno-strict-overflow","-std=c99","-pipe","-fdata-sections","-ffunction-sections","-D_POSIX_C_SOURCE=200809L","-DHAS_PTHREAD","-DIDRIS_ENABLE_STATS","-I.","-Wl,-gc-sections","/tmp/guix-build-idris-1.3.3.drv-0/idris2352-0.c","-L/gnu/store/a6181fb8957g7ayrgmqxgys4lcy7gxqf-idris-1.3.3/lib/idris/rts","-lidris_rts","-lgmp","-DIDRIS_GMP","-lpthread","-I/gnu/store/a6181fb8957g7ayrgmqxgys4lcy7gxqf-idris-1.3.3/lib/idris/rts","-lm","-I.","-I/gnu/store/a6181fb8957g7ayrgmqxgys4lcy7gxqf-idris-1.3.3/lib/idris/libs/contrib","-I../base","-I../prelude","-I.","-I/gnu/store/a6181fb8957g7ayrgmqxgys4lcy7gxqf-idris-1.3.3/lib/idris/libs/prelude","-I/gnu/store/a6181fb8957g7ayrgmqxgys4lcy7gxqf-idris-1.3.3/lib/idris/libs/base","ffi008.c","-o","ffi008"]
+True
+True
+a: 122 b: 0
+4
+00000010
\ No newline at end of file
Use -p '/ffi008/' to rerun this test only.
Suggested fix
Currently the mystruct structure becomes defined in both the linked ffi008.o and the generated idris code, via the %include C "ffi008.h". The structure should be defined in the .c and only declared in .h. The following patch fixes the test for me:
Steps to Reproduce
This uses gcc 10.3.0 and binutils 2.37
Expected Behavior
Test should pass.
Observed Behavior
The following error message:
Suggested fix
Currently the
mystruct
structure becomes defined in both the linkedffi008.o
and the generated idris code, via the%include C "ffi008.h"
. The structure should be defined in the.c
and only declared in.h
. The following patch fixes the test for me:The text was updated successfully, but these errors were encountered: