zholos / qml

math library for kdb+
http://althenia.net/qml
Other
65 stars 33 forks source link

Error when running make #13

Open baichen111 opened 1 year ago

baichen111 commented 1 year ago
make -C cephes install
make[1]: Entering directory '/home/baichen/myQML/qml/cephes'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/baichen/myQML/qml/cephes'
make -C openblas install
make[1]: Entering directory '/home/baichen/myQML/qml/openblas'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/baichen/myQML/qml/openblas'
make -C lapack install
make[1]: Entering directory '/home/baichen/myQML/qml/lapack'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/baichen/myQML/qml/lapack'
make -C conmax install
make[1]: Entering directory '/home/baichen/myQML/qml/conmax'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/baichen/myQML/qml/conmax'
make -C nlopt install
make[1]: Entering directory '/home/baichen/myQML/qml/nlopt'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/baichen/myQML/qml/nlopt'
make -C q install
make[1]: Entering directory '/home/baichen/myQML/qml/q'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/baichen/myQML/qml/q'
make -C src build
make[1]: Entering directory '/home/baichen/myQML/qml/src'
gcc -m64  -fPIC -pipe -shared -o qml.so const.o alloc.o util.o opt.o libm.o cephes.o lapack.o conmin.o conmax.o nlopt.o \
    ../lib/libprob.a ../lib/libconmax.a ../lib/libnlopt.a ../lib/liblapack.a ../lib/librefblas.a \
     \
      \
    -lgfortran \
    -lm \
    -Wl,--version-script,qml.mapfile
/usr/bin/ld: conmax.o:(.bss+0x0): multiple definition of `call'; conmin.o:(.bss+0x40): first defined here
/usr/bin/ld: nlopt.o:(.bss+0x0): multiple definition of `call'; conmin.o:(.bss+0x40): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [../mk/src.mk:43: qml.so] Error 1
make[1]: Leaving directory '/home/baichen/myQML/qml/src'
make: *** [Makefile:7: src_build] Error 2
pindash commented 1 year ago

I believe the issue is that new versions of gcc since 10 defaults to -fno-common this causes the error, add -fcommon to CFLAGS This solution worked for me, I first ran ./configure and then modified config.mk CFLAGS := -O2 -fno-strict-aliasing -ffloat-store -fcommon and then running make which orked for me

baichen111 commented 11 months ago

-fcommon to CFLAGS

can you share line NO. in configure to add -fcommon ? also I don't see a file named config.mk