egallesio / STklos

STklos Scheme
http://stklos.net
GNU General Public License v2.0
69 stars 17 forks source link

Build failure: s8.stk:0: Error: cannot find symbol `STk_module_main` in `/tmp/stklos/src/STklos/lib/scheme/vector/base.so` #656

Closed ecraven closed 3 months ago

ecraven commented 3 months ago

When building (under Arch Linux), I run into the following error:

make[4]: Leaving directory '/tmp/stklos/src/STklos/lib/scheme'
../../../utils/tmpcomp -C -o base-incl.c base.stk
gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/tmp/stklos/src=/usr/src/debug/stklos-git -flto=auto   -fpic -nostdlib \
        -I../../../src   -c -o base.o base.c
ld -shared  -o base.so base.o 
ld: base.o: plugin needed to handle lto object
ld: base.o: plugin needed to handle lto object
sed "s/TAG/s8/g"   tagvector-template.stk > s8.stk
../../../utils/tmpcomp -o s8.ostk s8.stk
s8.stk:0: Error: cannot find symbol `STk_module_main' in `/tmp/stklos/src/STklos/lib/scheme/vector/base.so'
make[3]: *** [Makefile:701: s8.ostk] Error 1
make[3]: Leaving directory '/tmp/stklos/src/STklos/lib/scheme/vector'
make[2]: *** [Makefile:579: all-recursive] Error 1
make[2]: Leaving directory '/tmp/stklos/src/STklos/lib/scheme'
make[1]: *** [Makefile:556: all-recursive] Error 1
make[1]: Leaving directory '/tmp/stklos/src/STklos/lib'
make: *** [Makefile:438: all-recursive] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
egallesio commented 3 months ago

Hello,

The problem seems to come from one of the (numerous) options introduced by makepkg command in the CFLAGS and LDFLAGS variables. I (rapidly) tried to see where the problem came from, and it seems to be link time optimization options (not sure of that, since I discover them). For now, I have forced CFLAGS value in the PKGBUILD which is on AUR, and yay -S stklos worked for me.

I pushed this new version of PKGBUILD on AUR. Can you tell me if it is OK for you, please?

ecraven commented 3 months ago

Thanks, this seems to work fine now!

egallesio commented 3 months ago

Great. Thanks