wsong83 / vpreproc

A Preprocessor for Verilog HDL written in C++
10 stars 5 forks source link

Does not compile with boost 1.69 #1

Closed typon closed 5 years ago

typon commented 5 years ago

After git cloning the repo, the vanilla Makefile does not work for me.

I had to make a few changes:

boost_inc_path = -I/my_path_to_boost/include
boost_lib_path = -L/my_path_to_boost/lib
# global variables
export BISON_EXE = bison
export FLEX_EXE = flex
export CXX = g++

export CXXFLAGS = -Wall -g ${boost_inc_path} -D _GLIBCXX_USE_CXX11_ABI=0
export LINKFLAGS = ${boost_lib_path} -lboost_program_options -lboost_filesystem -lboost_system

The pre-processor define -D _GLIBCXX_USE_CXX11_ABI=0 was a key missing piece that took me a while to debug, after getting linker issues. The reason we need this define is that the Boost libraries were compiled with this macro OFF, however the Boost headers have this macro ON by default.

Hopefully this helps any future users of this tool.

And thank you Song for creating this brilliant tool. I've been having several issues with the perl library and this one solves all of them.

wsong83 commented 5 years ago

I am afraid my computer is too oldish to reproduce this error (in a distribution OS). After some googling, I think this is an incompatibility between old GCC (before GCC 5) and newer GCC (after GCC 5). Hopefully when boost 1.69 is distributed across major Linux distributions, such incompatibility is resolved.