Closed awakse closed 9 years ago
did you clear the build directory after upgrading?
Yes, this is in a fresh clone of the master branch.
Do I need to rebuild any other libraries with the new compiler?
It should work without rebuilding. The error message Error running link command: No such file or directory
is a bit puzzling. Looks like it doesn't find the linker tool.
Is this still an issue? Try running "make VERBOSE=1" and post the output here.
It compiled alright on a different machine, but it's still an issue on this machine. I made small progress by watching the output from "make VERBOSE=1", it said that it couldn't find gcc-ar, so I fixed a symbolic link for that. Now the output is
Linking CXX static library libOSRM.a
/usr/bin/cmake -P CMakeFiles/OSRM.dir/cmake_clean_target.cmake
/usr/bin/cmake -E cmake_link_script CMakeFiles/OSRM.dir/link.txt --verbose=1
/usr/bin/gcc-ar cr libOSRM.a CMakeFiles/OSRM.dir/Library/OSRM_impl.cpp.o CMakeFiles/OSRM.dir/Descriptors/DescriptionFactory.cpp.o CMakeFiles/OSRM.dir/DataStructures/SearchEngineData.cpp.o CMakeFiles/OSRM.dir/DataStructures/RouteParameters.cpp.o CMakeFiles/OSRM.dir/DataStructures/Coordinate.cpp.o CMakeFiles/OSRM.dir/Algorithms/PolylineCompressor.cpp.o CMakeFiles/OSRM.dir/Algorithms/DouglasPeucker.cpp.o CMakeFiles/OSRM.dir/Server/Http/Reply.cpp.o CMakeFiles/GITDESCRIPTION.dir/Util/GitDescription.cpp.o CMakeFiles/FINGERPRINT.dir/Util/FingerPrint.cpp.o CMakeFiles/COORDINATE.dir/DataStructures/Coordinate.cpp.o CMakeFiles/LOGGER.dir/Util/simple_logger.cpp.o
sorry - this program has been built without plugin support
make[2]: *** [libOSRM.a] Error 1
make[2]: Leaving directory `/opt/osrm-backend/build'
make[1]: *** [CMakeFiles/OSRM.dir/all] Error 2
make[1]: Leaving directory `/opt/osrm-backend/build'
make: *** [all] Error 2
Looks like my version of gcc-ar
is the problem. When just doing gcc-ar --version
I get the same output "sorry - this program has been built without plugin support". Any ideas on how to proceed?
Might be that you also need a recent version of binutils (which should contain ar and ld). As far as I know, gcc-ar uses ar but tries to insert a plug-in. Hence the error. Maybe try to disable LTO in CMakeLists.txt, then it should also work for older linker versions.
Back at it again... It was my old version of gcc-ar that was the problem. Thanks for the help!
This led me to another problem, but that's another thread.
Thanks for the feedback.
Linking CXX static library libinnobase_embedded.a [ 40%] Built target innobase_embedded Scanning dependencies of target blackhole [ 40%] Building CXX object storage/blackhole/CMakeFiles/blackhole.dir/ha_blackhole.cc.o In file included from /usr/local/mysql-5.6.12/sql/sql_plugin.h:34:0, from /usr/local/mysql-5.6.12/sql/structs.h:23, from /usr/local/mysql-5.6.12/sql/unireg.h:170, from /usr/local/mysql-5.6.12/storage/blackhole/ha_blackhole.cc:19: /usr/local/mysql-5.6.12/sql/field.h: 在成员函数‘void Field_blob::store_ptr_andlength(const char, uint32)’中: /usr/local/mysql-5.6.12/sql/field.h:3268:50: 警告:argument to ‘sizeof’ in ‘void memmove(void, const void_, sizet)’ call is the same pointer type ‘char’ as the source; expected ‘char’ or an explicit length [-Wsizeof-pointer-memaccess] bmove(ptr + packlength, (char) &from, sizeof(char )); ^ /usr/local/mysql-5.6.12/include/m_string.h:52:45: 附注:in definition of macro ‘bmove’
^
Linking CXX static library libblackhole.a [ 40%] Built target blackhole Scanning dependencies of target blackhole_embedded [ 40%] Building CXX object storage/blackhole/CMakeFiles/blackhole_embedded.dir/ha_blackhole.cc.o In file included from /usr/local/mysql-5.6.12/sql/sql_plugin.h:34:0, from /usr/local/mysql-5.6.12/sql/structs.h:23, from /usr/local/mysql-5.6.12/sql/unireg.h:170, from /usr/local/mysql-5.6.12/storage/blackhole/ha_blackhole.cc:19: /usr/local/mysql-5.6.12/sql/field.h: 在成员函数‘void Field_blob::store_ptr_andlength(const char, uint32)’中: /usr/local/mysql-5.6.12/sql/field.h:3268:50: 警告:argument to ‘sizeof’ in ‘void* memmove(void, const void, sizet)’ call is the same pointer type ‘char’ as the source; expected ‘char’ or an explicit length [-Wsizeof-pointer-memaccess] bmove(ptr + packlength, (char) &from, sizeof(char )); ^ /usr/local/mysql-5.6.12/include/m_string.h:52:45: 附注:in definition of macro ‘bmove’
^
Linking CXX static library libblackhole_embedded.a [ 40%] Built target blackhole_embedded Scanning dependencies of target gen_lex_hash [ 40%] Building CXX object sql/CMakeFiles/gen_lex_hash.dir/gen_lex_hash.cc.o Linking CXX executable gen_lex_hash [ 40%] Built target gen_lex_hash Scanning dependencies of target GenServerSource [ 40%] Generating lex_hash.h [ 40%] Built target GenServerSource Scanning dependencies of target gen_pfs_lex_token [ 40%] Building CXX object storage/perfschema/CMakeFiles/gen_pfs_lex_token.dir/gen_pfs_lex_token.cc.o Linking CXX executable gen_pfs_lex_token [ 40%] Built target gen_pfs_lex_token [ 40%] Generating pfs_lex_token.h Scanning dependencies of target perfschema [ 40%] Building CXX object storage/perfschema/CMakeFiles/perfschema.dir/cursor_by_account.cc.o In file included from /usr/local/mysql-5.6.12/sql/sql_plugin.h:34:0, from /usr/local/mysql-5.6.12/sql/structs.h:23, from /usr/local/mysql-5.6.12/sql/unireg.h:170, from /usr/local/mysql-5.6.12/sql/sql_class.h:23, from /usr/local/mysql-5.6.12/sql/sql_acl.h:21, from /usr/local/mysql-5.6.12/storage/perfschema/pfs_engine_table.h:19, from /usr/local/mysql-5.6.12/storage/perfschema/cursor_by_account.h:24, from /usr/local/mysql-5.6.12/storage/perfschema/cursor_by_account.cc:22: /usr/local/mysql-5.6.12/sql/field.h: 在成员函数‘void Field_blob::store_ptr_andlength(const char, uint32)’中: /usr/local/mysql-5.6.12/sql/field.h:3268:50: 警告:argument to ‘sizeof’ in ‘void* memmove(void, const void, sizet)’ call is the same pointer type ‘char’ as the source; expected ‘char’ or an explicit length [-Wsizeof-pointer-memaccess] bmove(ptr + packlength, (char_) &from, sizeof(char *)); ^ /usr/local/mysql-5.6.12/include/m_string.h:52:45: 附注:in definition of macro ‘bmove’
can you help me ? i need you help man !
I fail to see how this is by any means related to OSRM or libosrm. If you think you're hitting an OSRM issue, please open a separate ticket, post more details and show us how it relates to OSRM.
Hi, the make script fails when linking CXX static library libOSRM.a
This is on a 64-bit CentOS 6 system. I recently updated to c/c++ 4.9.2, compiled from source. I have made successful OSRM builds on this machine before with 4.7.2. Any idea on what might be wrong?
Below is the output from my
cmake
andmake
commands.