Error while building OpenFOAM from source
I am trying to install openfoam from source on RHEL 8.3. As I do not have access to root privileges, I installed the required packages such as bison and flex from source as well. Before invoking ./Allwmake -s -l, I added the path to flex and bison binaries to $PATH
environment variable and path to flex lib to $LD_LIBRARY_PATH
. I also populated $FOAM_EXTRA_CFLAGS
and $FOAM_EXTRA_CXX_FLAGS
to "-I/<path to flex include>" and $FOAM_EXTRA_LDFLAGS
to "-L/<path to flex lib> -lfl". Now when I invoke ./Allwmake -s -l, the installation fails (while building applications) with a message that says: "flex-2.6.4-install/lib/libfl.so.2: undefined reference to yylex
". How to fix this problem to do a successful openfoam installation from source?