Re: x3 linker error with separate TU
Larry Evans <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 05/22/2017 11:10 AM, Olaf Peter wrote: > Hello, > > this refers to a question at stackoverflow, where since 14 days no > answer is known. From my side I've checked the related answers on > stackoverflow but there seems to be no solution: > https://stackoverflow.com/questions/43791079/x3-linker-error-with-separate-tu > > > Maybe here is a better place to get an answer since the rule count rises > and the compile time increases ... The problems stays with boost 1.64.0 > and gcc-7.10/clang-3.91 too. > > It seems to work with: https://github.com/cppljevans/spirit/tree/get_rhs at least based on the attached compilation.out and a slight change to the source, main.cpp, where: #define BOOST_ERROR_CODE_HEADER_ONLY was added at the top. HTH. -regards, Larry ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general
compilation.out
(text/plain, 4.2 KB)
Compilation started at Wed May 24 14:48:41
make -f gMakefile run
/home/evansl/dwnlds/llvm/3.9/prebuilt/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++ -c -O0 -stdlib=libc++ -std=c++1z -ftemplate-backtrace-limit=0 -fdiagnostics-show-template-tree -fno-elide-type -fmacro-backtrace-limit=0 -I/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include -I/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0 -DBOOST_SPIRIT_GET_RHS_CRTP=1 -DBOOST_SPIRIT_ATTR_XFORM_IN_RULE=1 -ftemplate-depth=200 main.cpp -MMD -o /tmp/build/clangxx3_9_pkg/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/workbench/x3/Olaf_linker_error/main.o
In file included from main.cpp:2:
In file included from ./grammar_def.hpp:2:
In file included from /home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3.hpp:17:
In file included from /home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3/nonterminal.hpp:10:
/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3/nonterminal/rule.hpp:17:11: warning:
yes(BOOST_SPIRIT_ATTR_XFORM_IN_RULE) [-W#pragma-messages]
#pragma message "yes(BOOST_SPIRIT_ATTR_XFORM_IN_RULE)"
^
/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3/nonterminal/rule.hpp:26:11: warning:
yes(BOOST_SPIRIT_GET_RHS_CRTP) [-W#pragma-messages]
#pragma message "yes(BOOST_SPIRIT_GET_RHS_CRTP)"
^
2 warnings generated.
/home/evansl/dwnlds/llvm/3.9/prebuilt/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++ -c -O0 -stdlib=libc++ -std=c++1z -ftemplate-backtrace-limit=0 -fdiagnostics-show-template-tree -fno-elide-type -fmacro-backtrace-limit=0 -I/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include -I/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0 -DBOOST_SPIRIT_GET_RHS_CRTP=1 -DBOOST_SPIRIT_ATTR_XFORM_IN_RULE=1 -ftemplate-depth=200 literal.cpp -MMD -o /tmp/build/clangxx3_9_pkg/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/workbench/x3/Olaf_linker_error/literal.o
In file included from literal.cpp:1:
In file included from ./literal_def.hpp:4:
In file included from ./literal.hpp:5:
In file included from /home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3.hpp:17:
In file included from /home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3/nonterminal.hpp:10:
/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3/nonterminal/rule.hpp:17:11: warning:
yes(BOOST_SPIRIT_ATTR_XFORM_IN_RULE) [-W#pragma-messages]
#pragma message "yes(BOOST_SPIRIT_ATTR_XFORM_IN_RULE)"
^
/home/evansl/prog_dev/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/include/boost/spirit/home/x3/nonterminal/rule.hpp:26:11: warning:
yes(BOOST_SPIRIT_GET_RHS_CRTP) [-W#pragma-messages]
#pragma message "yes(BOOST_SPIRIT_GET_RHS_CRTP)"
^
2 warnings generated.
/home/evansl/dwnlds/llvm/3.9/prebuilt/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++ -stdlib=libc++ /tmp/build/clangxx3_9_pkg/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/workbench/x3/Olaf_linker_error/main.o /tmp/build/clangxx3_9_pkg/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/workbench/x3/Olaf_linker_error/literal.o -o /tmp/build/clangxx3_9_pkg/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/workbench/x3/Olaf_linker_error/main.exe
/tmp/build/clangxx3_9_pkg/boost/releases/ro/boost_1_64_0/sandbox/pull_requests/context_debug_fix.fork/spirit/workbench/x3/Olaf_linker_error/main.exe
Compilation finished at Wed May 24 14:48:45