FUEL
FUEL copied to clipboard
Compilation issue on 20.04
Hi ,
I go ahead with the recommendation of "-std=c++14" change in the cmakes, and installed dw. All is compiling other than lkh_tsp_solver. I am getting the following error.
usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xa0): multiple definition of PatchingCExtended; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xa0): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xa4): multiple definition of PatchingARestricted; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xa4): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xa8): multiple definition of PatchingAExtended; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xa8): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xac): multiple definition of MoorePartitioning; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xac): first defined here /usr/bin/ld: CMakeFiles/lkh_tsp_solver.dir/src/SolveCompressedSubproblem.c.o:(.bss+0xb0): multiple definition of KMeansPartitioning; CMakeFiles/lkh_tsp_solver.dir/src/Activate.c.o:(.bss+0xb0): first defined here
I did take a look at RACER repo, where they recommend installing LKH-3.0.6 on the system-wide. I tried to compile the LKH-3.0.6 and I get the same error. Also checked LKH-3.0.5, which also does not compile on Ubuntu20.04, LKH-3.0.7 and LKH-3.0.8 compiles but there are some changes on the APIs, so not sure how to add that part. Any recommendations?
I solved it by downgrading to gcc/g++9, I was using gcc/g++ 11. Please feel free to close.
hello
i downgraded to gcc/g++ version 9, but the same error continues to occur.
is there any other way,...?
thanks
@romaster93 can you give more details ? Did you set the gcc/g++-9 as the default ? What is the result of gcc -v
?
@xepost
gcc -v result :
Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
but still cannot build ..... :(