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
The cmake configuration phases of both the main repository and example/ap203min fail on Linux/gcc (Fedora 32) in the current master branch (2021-01-09), but there are easy fixes/workarounds.
Main configuration: Multiply defined symbols: ALG_fl, FUNC_fl, RULE_fl, PROC_fl, and WHERE_fl seem to be defined both in src/express/alg.c and src/express/memory.c causing a linking error during cmake configuration. Workaround/probable fix: change the declarations in alg.c to be extern
example/ap203min: cmake fails trying to read include/sc_cf.h.in Workaround: make a symbolic link at example/ap203min/include that points at ../../include
Probable fix: in the configure_file() call in cmake/SC_Config_Headers.cmake the ${CMAKE_SOURCE_DIR} should probably be ${SC_SOURCE_DIR}
Can you tell me which version of GCC you're using? On Ubuntu I'm not seeing the issue with alg.c vs. memory.c, and since only alg.c in master has ALG_fl I'm not quite sure where memory.c is pulling the definition from.
I think the above commit should handle the example - thanks for catching that. Looking at that, I should probably look at making that example work with an installed stepcode rather than depending on the stepcode build dir...
I did a fresh clone of the repo, and my HEAD is now on your fix commit. I get that same error:
/usr/bin/ld:
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/memory.c.o:/home/user/src/stepcode/src/express/memory.c:29:
multiple definition of `FUNC_fl';
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/alg.c.o:/home/user/src/stepcode/src/express/alg.c:46:
first defined here
/usr/bin/ld:
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/memory.c.o:/home/user/src/stepcode/src/express/memory.c:30:
multiple definition of `RULE_fl';
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/alg.c.o:/home/user/src/stepcode/src/express/alg.c:47:
first defined here
/usr/bin/ld:
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/memory.c.o:/home/user/src/stepcode/src/express/memory.c:31:
multiple definition of `PROC_fl';
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/alg.c.o:/home/user/src/stepcode/src/express/alg.c:48:
first defined here
/usr/bin/ld:
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/memory.c.o:/home/user/src/stepcode/src/express/memory.c:32:
multiple definition of `WHERE_fl';
CMakeFiles/schema_scanner.dir/home/user/src/stepcode/src/express/alg.c.o:/home/user/src/stepcode/src/express/alg.c:49:
first defined here
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/schema_scanner.dir/build.make:538:
/home/user/src/stepcode/build/bin/schema_scanner] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/schema_scanner.dir/all]
Error 2
gmake: *** [Makefile:103: all] Error 2
Call Stack (most recent call first):
data/CMakeLists.txt:14 (include)
-- Configuring incomplete, errors occurred!
Activity
Fix example build (Issue #404) by adding the sc_cf.h.in file (making …
starseeker commentedon Jan 10, 2021
Can you tell me which version of GCC you're using? On Ubuntu I'm not seeing the issue with alg.c vs. memory.c, and since only alg.c in master has ALG_fl I'm not quite sure where memory.c is pulling the definition from.
I think the above commit should handle the example - thanks for catching that. Looking at that, I should probably look at making that example work with an installed stepcode rather than depending on the stepcode build dir...
wdconinc commentedon Apr 1, 2021
This is an issue with gcc-10, see e.g. https://gcc.gnu.org/gcc-10/porting_to.html, likely the default to
-fno-common. Adding extern inalg.cseems to do the job.hoijui commentedon Jun 9, 2021
I did a fresh clone of the repo, and my HEAD is now on your fix commit. I get that same error:
hoijui commentedon Jun 9, 2021
looking at the error logs file, strangely, I got other/more errors:
Fix compile error related to ODR violation.
Fix example build (Issue #404) by adding the sc_cf.h.in file (making …
Fix example build (Issue #404) by adding the sc_cf.h.in file (making …
Fix example build (Issue #404) by adding the sc_cf.h.in file (making …
Fix example build (Issue #404) by adding the sc_cf.h.in file (making …
Fix compile error related to ODR violation.