Closed ilovezfs closed 6 years ago
Thank you @ilovezfs for this report. Does this error only affect when it compiles with XCode?
only xcode 9.3
Thanks. I develop with Linux and I can't test it but I can ask to other team members.
@cayetanobv fwiw Travis has an xcode9.3 image https://docs.travis-ci.com/user/reference/osx/
hey thanks! Awesome.
@ilovezfs I dont have a mac, and I don't even understand what xcode9.3 is, but from the messages I deduce that having lexical cast in a header file is when the problems show up.
I made this "fix" by removing all "include <boost/lexical_cast.hpp>
from the header files
https://github.com/cvvergara/osm2pgrouting/tree/issue227
I wonder if you can compile that branch, and see if the issue gets fixed, so that I make the PR to master.
@cvvergara I can test with 9.3 in a bit, but testing with Xcode 8.2.1
bash-3.2$ make -j1
/usr/local/Cellar/cmake/3.11.1/bin/cmake -H/tmp/osm2pgrouting-20180419-86054-4qcrrl -B/tmp/osm2pgrouting-20180419-86054-4qcrrl/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_progress_start /tmp/osm2pgrouting-20180419-86054-4qcrrl/build/CMakeFiles /tmp/osm2pgrouting-20180419-86054-4qcrrl/build/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/osm2pgrouting.dir/build.make CMakeFiles/osm2pgrouting.dir/depend
cd /tmp/osm2pgrouting-20180419-86054-4qcrrl/build && /usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/osm2pgrouting-20180419-86054-4qcrrl /tmp/osm2pgrouting-20180419-86054-4qcrrl /tmp/osm2pgrouting-20180419-86054-4qcrrl/build /tmp/osm2pgrouting-20180419-86054-4qcrrl/build /tmp/osm2pgrouting-20180419-86054-4qcrrl/build/CMakeFiles/osm2pgrouting.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/osm2pgrouting.dir/build.make CMakeFiles/osm2pgrouting.dir/build
[ 3%] Linking CXX executable osm2pgrouting
/usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_link_script CMakeFiles/osm2pgrouting.dir/link.txt --verbose=1
/usr/local/Homebrew/Library/Homebrew/shims/super/clang++ -std=c++14 -D_FILE_OFFSET_BITS=64 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/osm2pgrouting.dir/src/configuration/configuration.cpp.o CMakeFiles/osm2pgrouting.dir/src/configuration/tag_key.cpp.o CMakeFiles/osm2pgrouting.dir/src/configuration/tag_value.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/Export2DB.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/configuration_config.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/osm_nodes_config.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/osm_relations_config.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/osm_ways_config.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/pois_config.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/table_management.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/ways_config.cpp.o CMakeFiles/osm2pgrouting.dir/src/database/ways_vertices_pgr_config.cpp.o CMakeFiles/osm2pgrouting.dir/src/osm_elements/Node.cpp.o CMakeFiles/osm2pgrouting.dir/src/osm_elements/OSMDocument.cpp.o CMakeFiles/osm2pgrouting.dir/src/osm_elements/Relation.cpp.o CMakeFiles/osm2pgrouting.dir/src/osm_elements/Way.cpp.o CMakeFiles/osm2pgrouting.dir/src/osm_elements/osm2pgrouting.cpp.o CMakeFiles/osm2pgrouting.dir/src/osm_elements/osm_element.cpp.o CMakeFiles/osm2pgrouting.dir/src/osm_elements/osm_tag.cpp.o CMakeFiles/osm2pgrouting.dir/src/parser/ConfigurationParserCallback.cpp.o CMakeFiles/osm2pgrouting.dir/src/parser/OSMDocumentParserCallback.cpp.o CMakeFiles/osm2pgrouting.dir/src/parser/XMLParser.cpp.o CMakeFiles/osm2pgrouting.dir/src/utilities/handle_pgpass.cpp.o CMakeFiles/osm2pgrouting.dir/src/utilities/prog_options.cpp.o CMakeFiles/osm2pgrouting.dir/src/utilities/utilities.cpp.o -o osm2pgrouting /usr/local/lib/libpqxx.dylib /usr/local/opt/libpq/lib/libpq.dylib /usr/local/opt/expat/lib/libexpat.dylib /usr/local/lib/libboost_program_options-mt.dylib
Undefined symbols for architecture x86_64:
"std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
osm2pgr::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, osm2pgr::Tag const&) in osm_tag.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [osm2pgrouting] Error 1
make[1]: *** [CMakeFiles/osm2pgrouting.dir/all] Error 2
make: *** [all] Error 2
We'll see what CI thinks https://github.com/Homebrew/homebrew-core/pull/26825
@ilovezfs So, I see it compiles but the problem is the linking
I added a missing include file #include<iostream>
https://github.com/pgRouting/osm2pgrouting/commit/8caa916d61b254ae7841733f2c01c029e3c9537f
So you can try that branch again.
@cvvergara But it seems it was still failing to compile with 9.3: https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/22569/version=high_sierra/console
trying https://github.com/pgRouting/osm2pgrouting/commit/8caa916d61b254ae7841733f2c01c029e3c9537f now https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/22572/
yes still same failures with 9.3
From (edit, because I made the wrong copy paste)
/tmp/osm2pgrouting-20180419-90092-siqmlv/include/osm_elements/Relation.h:63:52: note: in instantiation of member function 'std::__1::vector<long long, std::__1::allocator<long long> >::vector' requested here
std::vector<int64_t> way_refs() const {return m_WayRefs;}
I commented out the that line, https://github.com/pgRouting/osm2pgrouting/commit/69561b1ecfab63919dd2b258e62ade5367af3ad7
Can you run the branch again to see what happens, thanks
@cvvergara unfortunately still fails: https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/22612/version=high_sierra/console
thanks, I tink its on the right track, because the previous error does no show anymore
This https://github.com/pgRouting/osm2pgrouting/commit/f68dae76ee855fb597c20f3112802eb454e0797b tries to fix:
07:44:50 /tmp/osm2pgrouting-20180420-28702-1ltb1tq/include/osm_elements/Way.h:67:56: note: in instantiation of member function 'std::__1::vector<osm2pgr::Node *, std::__1::allocator<osm2pgr::Node *> >::vector' requested here
07:44:50 const std::vector<Node*> nodeRefs() const {return m_NodeRefs;}
Can you run that one out please (its the same branch)
@ilovezfs The last error does not show any more,
this: https://github.com/pgRouting/osm2pgrouting/commit/af872af8724a33fb7f382618486da6c4db553a15 tries to fix:
tmp/osm2pgrouting-20180422-31561-15sc8g8/include/database/table_management.h:83:16: note: in instantiation of member function 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >::push_back' requested here
m_sql.push_back(sql);
Can you run that one out please
@ilovezfs try this one please https://github.com/pgRouting/osm2pgrouting/commit/e443b1367784f7d55f6dd3ca3c8f300c68d260df
@cvvergara sure. Still fails: https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/22758/version=high_sierra/console
@ilovezfs try this one please https://github.com/pgRouting/osm2pgrouting/commit/6fa59fd148917a7df470cf1bd921c5a30d5c6ce4
@ilovezfs try this one please https://github.com/pgRouting/osm2pgrouting/commit/20ccc331c268b4e38c8049e6567cd32a6f19392b
@ilovezfs try this one please https://github.com/pgRouting/osm2pgrouting/commit/7c9ab04c87817b6ccbdedf4a5ff078d22ac06c4a
It looks like the issue was the nullptr
redefinition. The ifdef
didn't trip on clang, which does provide nullptr
; switching to a more inclusive check in #230 fixes it.
@ilovezfs I made the merge to master can you try master with that change please.
@cvvergara Yes 5de05744abf2ddbd6c0b70ca1e5aa9cf19ce8c26 works! https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/24328/version=high_sierra/console
Boost 1.67.0 https://gist.github.com/commitay/353a36ac506ffa735936a01c2d747155