Compilation error for openfoam - 1.6
Hi,
I am trying to compile the OpenFOAM v. 1.6 for the first time for a new user application and getting the error message described below: Making dependency list for source file icoFoam.C SOURCE=icoFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/icoFoam.o g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/icoFoam.o -L/user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt \ -lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /user/leuven/300/vsc30098/OpenFOAM/vsc30098-1.6/applications/bin/linux64GccDPOpt/myicoFoam /user/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so: file not recognized: File format not recognized collect2: ld returned 1 exit status make: *** [/user/leuven/300/vsc30098/OpenFOAM/vsc30098-1.6/applications/bin/linux64GccDPOpt/myicoFoam] Error 1 Does someone have any idea to solve this linking error? Thx in advance. |
Error compiling new solvers and ParaFoam
Hello folks,
I'm having a very similar problem as misakagan while compiling both new solvers and paraFoam. I'm working with SLES 10. That is the the printout of my problem. /home/andrea/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libsampling.so: file not recognized: File format not recognized collect2: ld returned 1 exit status make: *** [/home/andrea/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/financialFoam] Error 1 Does anybody have an idea of how to fix this error? Thanks AB |
Hello Andrea,
Did you unpack the binary packages of OpenFOAM? If so, that might be the reason for the linking issue. The gcc versions might be incompatible. Try: Code:
rm -rf /home/andrea/OpenFOAM/OpenFOAM-1.6/lib/* Then redo ./Allwmake from the folder OpenFOAM-1.6. Hope it works. Best regards, Bruno |
Still problems compiling OpenFOAM 1.6 on SLES 10
Thank you Bruno for your reply.
Unfortunately your hint doesnt fix the problem. Durign re-compiling we still realize the same errors as posted previously about collect2: *** file not recognized: File format not recognized collect2: ld returned 1 exit status Consequently the compilation failed. I'm a newbie but it seems that there are problems with the linkage between OpenFoam libraries and SLES libraries. Do you have other hints? Does anybody know if there is an incompatibility between SLES 10 and OpenFOAM 1.6? That's because I tried to install OpenFOAM in my private laptop which use DEBIAN as OS and I didnt realize any problem. For my project I have to compare the resaults of Fluent12 and OpenFOAM and on my server machine I must install either SLES 10 or RedHat Enterprise 4/5 which support Fluent12. Does anybody had problems installing OpenFOAM 1.6 on RedHat Enteprise 4 or 5? With regards. AB |
Hello Andrea,
Are you using the system compiler (did you change the file OpenFOAM-1.6/etc/settings.sh)? Or the are you using gcc-4.3.3 that comes in the ThirdParty Folder? To build the packed gcc-4.3.3, in a terminal/console, go to the ThirdParty folder and do: Code:
./makeGcc gcc-4.3.3 Open a new terminal again (assuming you already have OpenFOAM-1.6/etc/bashrc in your ~/.bashrc), and you shouldn't see any errors. Also, try searching for SLES on this forum... and/or the full OS name. There have been some other issues with the more recent compilers that come with the latest Linux distros. Best regards, Bruno |
Hello Bruno,
I tried to use both system compiler and OpenFOAM compiler by changing the setting.sh file but I realized exactly the same errors. The Gcc package was already installed and this is the printout: Building on 4 cores gmp already built. mprf already built. gcc already built. I followed step by step all the procedures according to the userguide but I really do not understand how to go forward. I even tried to look for other posts in this forum, whitout results. I really think it may be an incompatibilty problem between OepnFOAM and my linux distribution. Best regards, AB |
Quote:
If you can, try starting from scratch again, and unpack only the source code files, namely the ".General.tar.gz" packages. Then build the gcc that comes with the ThirdParty folder. And then you build OpenFOAM. NOTE: if you don't want to start from scratch, remove the contents of the folder gcc-4.3.3/platforms. Additionally, there are several packages that you should install in your SLES. The names in Ubuntu are: flex git git-core build-essential python-dev libqt4-dev libreadline5-dev wget zlib1g-dev texinfo byacc bison cmake.You'll also need gcc-multilib if you want to build the 32 version. Some of these names should be the same, but others may be under other names. Hope you can do it this time! Bruno |
Bruno, I really appreciate your help
I followed up your instructions but I had problems while compiling Gcc: Building on 4 cores make: *** No rule to make target `distclean'. Stop. Finished building gmp. make: *** No rule to make target `distclean'. Stop. Finished building mpfr. make: *** No rule to make target `distclean'. Stop. Finished building gcc. Do you have an idea of what does it mean? Probably I'm forgetting something... Furthermore I'm looking for the other packages to be added. Regards, AB |
Quote:
gcc-4.3.3If it still gives you the same warning/error, then edit the makeGcc script and remove the 3 lines that say: Code:
&& if [ -e Makefile ]; then make distclean; fi \ |
Sorry Bruno,
I'm getting a little bit confused. I unpacked just the two "*.General.tar.gz" packages in order to compile everything from scratch. Inside the following folders gcc-4.3.3 mpfr-2.4.1 gmp-4.2.4 I cannot find neither the Platform folder nor the build folder, so I could not delete anything. Furthermore, I cannot find the 3 lines to be removed inside the makeGcc script. How could it be possible? Thanks in advance. AB |
OH, I thought you didn't do a clean deploy just now... OK, let me think... ah, now I remember, I tweaked the makeGcc script... sorry.
I guess it's easier this way... Here is my tweaked version of makeGcc: Code:
#---------------------------------*- sh -*------------------------------------- I hope that now you can get it to work! |
1 Attachment(s)
Hello Bruno, thank you again for trying to help me.
Unfortunately, also the last solution proposed doesnt work. Now the compilation start correctly (at least as it seems) but cannot be completed. I attach here the log file hoping you may better understand the problem. Attachment 1779 |
1 Attachment(s)
Hello Andrea,
Well, lucky you! I've already come across this problem too :) "log1p.c not found" And I've also already reported on this forum here: Quote:
Code:
cd ThirdParty-1.6 If you don't trust my patch (or something else goes wrong), then download and unpack the official version of mpfr-2.4.1! Remember, victory will likely only happen if you keep going on fighting, no matter how many battles you loose ;) Of course that might also lead to the wrong battles being fought :rolleyes: Best regards, Bruno |
Still problems with gcc compilation from scratch
1 Attachment(s)
Hello Bruno.
Honestly, I'm not used to throw in the sponge so quickly. Nevertheless I'm still obtaining errors while compiling Gcc even using the patchMPFR file. I send you the log file Attachment 1806 In the meantime, I asked to my system administrator for the installation of the additional packages according to your previous post but I'm still waiting for. I wonder if the problems I realized may be concerned to this lack. Next steps are trying to install previous versions of OpenFOAM or better change the machine using a different linux distribution. However, from tomorrow I'm on holiday, so I'll think about it next year... :cool: :cool: :cool: Really all the best and happy new year in advance. Andrea |
Greetings Andrea,
Well, now here is something I mentioned before... you're missing the multilib package. Code:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory I'll edit this post later... best, Bruno |
Bruno,
I confirm you that the file stubs-32.h is missing. The folder /usr/include/gnu/ contains only the following files: - stubs-64.h - stubs.h - libc-version.h - lib-names.h Please consider I'm working on a 64-bit machine. Best Regards, Andrea |
regarding stubs32.h
Hello,
i am getting the same errors on a 64-bit machine trying to compile gcc. As far as i can tell you are missing the 32-bit glibc-headers. Please install them from your distro (in Ubuntu the package is called: libc6-dev-i386) In my opinion the makeGcc-script and the overall documentation regarding this toolchain (compiling your own gcc) really needs some polishing. with kind regards, Steffen |
Ah, it was multilib...
Greetings Steffen and welcome to the forum!
Your way works well, but Andrea has a minor limitation: he doesn't have administrative permissions over his working machine... so it might take a while for the admin to install the missing packages. So, Andrea and Steffen, if you only want to build 64bit versions of OpenFOAM, then by adding "--disable-multilib" to the configure line in the makeGcc script, you can disable the multilib functionality of gcc. In other words, while the original version can build 32 and 64 executables, this disabled multilib version will only allow building 64bit applications. If you were building in 32 bit Linux, then only 32bit would be available. The whole script is as follows: Code:
#---------------------------------*- sh -*------------------------------------- Code:
gcc flex bison m4 git-core build make texinfo Oh, by the way Andrea, the script I previously posted here had a slight incompatibility with the original OpenFOAM-1.6 distribution... I added "$WM_COMPILER" to the folder paths of gcc, gmp and mpfr. Now it's fixed... I think. So it should work out of the box now :) And Steffen: Quote:
Additionally, the OpenFOAM 1.6.x git version should build properly with the more recent gcc versions (4.4.1 and up to 4.5.x), so "yast/zypper/apt-get/synaptic" (and others, depending on your distro) should do the trick pretty well ;) Best regards and I hope it works now! Bruno |
OpenFOAM compiling problems
Greatings Bruno,
first of all my apologies if I didnt reply you before. I've tried the last solution you posted here but I'm still having problems while compiling. Probably I'm still missing some additional packages that should be installed. In the meantime I asked for a brand new machine and installing Debian as OS all works fine. So, even if I havent fix the problem thanks for your kind help. I hope your hints may help others foamers. With best regards, Andrea |
Quote:
Tibo Edit: ok, actually "only" about 80% is gone. Anyway, I´m on the right way =D |
All times are GMT -4. The time now is 01:10. |