CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Cannot Compile libtriSurface.so on Allwmake (http://www.cfd-online.com/Forums/openfoam-installation/105104-cannot-compile-libtrisurface-so-allwmake.html)

iamed18 July 23, 2012 08:44

Cannot Compile libtriSurface.so on Allwmake
 
1 Attachment(s)
FOAMers,

I've been able to use CentFOAM in my travels thus far, but now I must venture to the world of Fedora 13 with the latest version of OF. I downloaded the source for OF-2.1.1, sourced the environment variables file, and after making sure that the system I'm on has gcc-4.4.5, I tried to compile.

Some of the source compiles just fine, as notable in the attached output, while some fails. I've attached the output from compilation until it starts to error on various aspects of compilation. After trying to follow it a bit, many problems arise from the inability to compile libfiniteVolume.so, which doesn't compile due to a missing triSurface.so, which I can't seem to troubleshoot much further myself. See here:

Code:

/usr/bin/ld: cannot find -ltriSurface
collect2: ld returned 1 exit status
make: *** [/home/leonard/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libfiniteVolume.so] Error 1

This causes several cases of:

Code:

/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status
make: *** [/home/leonard/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/libreconstruct.so] Error 1

Any input on this?
Thanks,
~Ed

P.S.
Code:

flex    2.5.36    /home/leonard/Software/flexbuild/flex
gcc      4.4.5    /usr/bin/gcc
gzip    1.3.13    /bin/gzip
tar      1.22      /bin/tar


wyldckat July 23, 2012 16:57

Greetings Edward,

The problem is this:
Quote:

Code:

SOURCE=triSurface/interfaces/STL/readSTLASCII.L ; flex -+ -oMake/linux64GccDPOpt/readSTLASCII.C -f $SOURCE ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/leonard/OpenFOAM/OpenFOAM-2.1.1/src/fileFormats/lnInclude -IlnInclude -I. -I/home/leonard/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/leonard/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude  -fPIC -c Make/linux64GccDPOpt/readSTLASCII.C -o Make/linux64GccDPOpt/readSTLASCII.o
Make/linux64GccDPOpt/readSTLASCII.C:313:23: error: FlexLexer.h: No such file or directory


You apparently have made a custom installation of Flex and although the binary file is visible to wmake via the environment variable "PATH", but the "FlexLexer.H" is not accessible using the conventional inclusion paths.

So, the trick should be:
  1. Check if you can find the file where you installed Flex:
    Code:

    find /home/leonard/Software/flexbuild/ -name FlexLexer.h
  2. If you can find it, create a symbolic link for it to where OpenFOAM's main "lnInclude" folder is:
    Code:

    ln -s /home/leonard/Software/flexbuild/include/FlexLexer.h $FOAM_SRC/OpenFOAM/lnInclude/FlexLexer.h
    The first path is an assumption but the second one should be correct.
Best regards,
Bruno

iamed18 July 24, 2012 10:58

Quote:

Originally Posted by wyldckat (Post 373075)
Greetings Edward,

The problem is this:
You apparently have made a custom installation of Flex and although the binary file is visible to wmake via the environment variable "PATH", but the "FlexLexer.H" is not accessible using the conventional inclusion paths.

This was exactly my problem, and the fix was quite similar (FlexLexer.h happens to be in the original source directory of flex, not the build directory).

Thanks for the input! I'm happily FOAMing once again.
~Ed


All times are GMT -4. The time now is 10:23.