CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

Compiling OpenFOAM13 on AMD64 with Redhat Enterprise

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2006, 16:54
Default Hello again John, Somehow,
  #1
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello again John,

Somehow, it looks like your gcc compiler is not compatible with your host linker "/usr/bin/ld".

Did you installed a pre-compiled version of gcc 4.0.1? If so, did you get it from a RedHat RPM, or did you install the pre-compiled version from OpenCFD?

Just as a test, can you compile and link a simple "hello World" program using your gcc 4.1.0 compiler?

If you installed a pre-compiled version of gcc, and/or if you cannot compile and link a simple C or C++ program, I would suggest you take another look at this section:
http://openfoamwiki.net/index.php/Howto_compile_O penFOAM#Compiling_and_installing_GNU_Gcc

Good luck.

Martin
mbeaudoin is offline   Reply With Quote

Old   May 5, 2006, 17:57
Default Hi, Martin, It is nice to "
  #2
liuxi
Guest
 
Posts: n/a
Hi, Martin,

It is nice to "see" you again. I did compile gcc-4.1.0 according to the instructions on your Wiki and I used "which g++" and it showed "/home/liux/OpenFOAM/linuxAMD64/gcc-4.1.0/bin/g++".

Then I compiled a little code:

#include<iostream>
using namespace std;
int main()
{
cout<<"Hello! World\n";
return 0;
}

and it gave out the following error message:

/usr/bin/ld: cannot open crtbegin.o: No such file or directory
collect2: ld returned 1 exit status

I will check the gcc compilation again.

Thanks and have a nice weekend!

Best Regards,

John
  Reply With Quote

Old   May 5, 2006, 18:35
Default Hi John, I will check on my
  #3
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hi John,

I will check on my side as well.

Looks like there is something missing from the recompilation instructions.

Later.

Martin
mbeaudoin is offline   Reply With Quote

Old   May 6, 2006, 00:29
Default Hello John, I went on a AMD
  #4
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello John,

I went on a AMD64 Redhat Enterprise System to test the recompilation instructions for gcc, and guess what? I could not even compile gcc!

I got stuck on a strange "ld" error message right in the middle of recompiling gcc. Could not go any further with the default RedHat installation...

This never happens to me on a SuSE or Debian platform, or even on our x86 RedHat Enterprise workstation; looks like the standard RedHat installation is a tad different for x86_64...

So here is what I did:

We already know that OpenCFD has compiled OpenFOAM 1.3 on a SuSE 10 platform using gcc 4.1.0.

Looking up rpmfind.net, we can see that SuSE 10 is shipped with binutils 2.16.91.

On our RedHat Enterprise AMD64 workstation, we have binutils-2.15.92.0.2-18 installed.

So, since the problem is somehow related to "/usr/bin/ld", and since "ld" is provided by the binutils package, I decided to first do a full local installation of the latest version of GNU binutils from the GNU ftp site (binutils-2.16.1.tar.bz2).

Once binutils 2.16 is fully compiled and installed locally, you need to make sure your PATH will point first to the local installation of binutils 2.16 when looking for "ld" (verify by checking "which ld" on the command line).

Then, I followed the recompilation instructions for gcc from the OpenFOAM Wiki Howto. Using the brand new version of "ld", I was able to completely recompile gcc/g++ from the source archive.

Once the brand new gcc compiler installed, I tried to compile your little "Hello World" test program, and everyting went smoothly, compilation, linking, and, of course execution of the program.

So, it seems that gcc 4.1.0 do needs a very recent version of "ld" on a RedHat Enterprise x86_64; at least it did on our RedHat machine.

I will update the recompilation instructions on the OpenFOAM Wiki in order for you to try that solution by yourself. I sure hope this will solve your problem.

Later,

Martin
mbeaudoin is offline   Reply With Quote

Old   May 8, 2006, 17:33
Default Martin, I followed your ins
  #5
liuxi
Guest
 
Posts: n/a
Martin,

I followed your instruction on Wiki to install binutils 2.16.1 and gcc-4.1.0. binutils installation went except a little error during configuring. I put it here:
-------------------------------------
configure:2260: checking for correct version of gmp.h
configure:2273: gcc -c -g -O2 conftest.c 1>&5
configure:2286: checking for MPFR
configure:2299: gcc -o conftest -g -O2 conftest.c -lmpfr -lgmp 1>&5
configure:2293:18: mpfr.h: No such file or directory
configure: In function `main':
configure:2295: `mpfr_t' undeclared (first use in this function)
configure:2295: (Each undeclared identifier is reported only once
configure:2295: for each function it appears in.)
configure:2295: syntax error before "n"
configure:2295: `n' undeclared (first use in this function)
configure: failed program was:
#line 2291 "configure"
#include "confdefs.h"
#include <gmp.h>
#include <mpfr.h>
int main() {
mpfr_t n; mpfr_init(n);
; return 0; }
configure:2786: checking for bison
configure:2821: checking for bison
---------------------------------------------

But I got the following error when I try to compile gcc-4.1.0

-----------------------------------------------

mv: cannot stat `libgcc/*.vis': No such file or directory
make[3]: Leaving directory `/home/liux/OpenFOAM/linuxAMD64/tmp/gcc-4.1.0/gcc-4.1.0-obj/gcc'
subdirs="cp build"; for dir in $subdirs; \
do \
if [ -d stage1/$dir ] ; then true ; else mkdir stage1/$dir ; fi ; \
done
rm -f stage1/libgcc.a stage1/libgcc_eh.a stage1/libgcov.a
rm -f stage1/libgcc_s*.so
rm -f stage1/libunwind.a stage1/libunwind*.so
mv specs stage1/specs
mv *.o s-* xgcc cpp cc1 cc1*-dummy crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o gcc-cross protoize unprotoize specs collect2 gcov-iov gcov gcov-dump *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk g++ g++-cross cc1plus stage1
mv: cannot stat `crtbegin.o': No such file or directory
mv: cannot stat `crtbeginS.o': No such file or directory
mv: cannot stat `crtbeginT.o': No such file or directory
mv: cannot stat `crtend.o': No such file or directory
mv: cannot stat `crtendS.o': No such file or directory
mv: cannot stat `crtfastmath.o': No such file or directory
mv: cannot stat `gcc-cross': No such file or directory
mv: cannot stat `protoize': No such file or directory
mv: cannot stat `unprotoize': No such file or directory
mv: cannot stat `specs': No such file or directory
mv: cannot stat `gcov-iov': No such file or directory
mv: cannot stat `gcov': No such file or directory
mv: cannot stat `gcov-dump': No such file or directory
mv: cannot stat `*.[0-9][0-9].*': No such file or directory
mv: cannot stat `*.[si]': No such file or directory
mv: cannot stat `g++-cross': No such file or directory
mv: cannot stat `cc1plus': No such file or directory
make[2]: [stage1-start] Error 1 (ignored)




------------------------------------------------------------------
mv specs stage1/specs
mv *.o s-* xgcc cpp cc1 cc1*-dummy crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o gcc-cross protoize unprotoize specs collect2 gcov-iov gcov gcov-dump *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk g++ g++-cross cc1plus stage1
mv: cannot stat `crtbegin.o': No such file or directory
mv: cannot stat `crtbeginS.o': No such file or directory
mv: cannot stat `crtbeginT.o': No such file or directory
mv: cannot stat `crtend.o': No such file or directory
mv: cannot stat `crtendS.o': No such file or directory
mv: cannot stat `crtfastmath.o': No such file or directory
mv: cannot stat `gcc-cross': No such file or directory
.h tm-preds.h tree-check.h insn-conditions.c min-insn-modes.c insn-modes.c insn-modes.h genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-gen.h stage1
if [ -f as ] ; then (cd stage1 && ln -s ../as .) ; else true ; fi
if [ -f ld ] ; then (cd stage1 && ln -s ../ld .) ; else true ; fi
if [ -f collect-ld ] ; then (cd stage1 && ln -s ../collect-ld .) ; else true ; fi
cp libgcc.a stage1
ranlib stage1/libgcc.a
cp libgcov.a stage1
ranlib stage1/libgcov.a
if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage1; \
ranlib stage1/libgcc_eh.a; \
fi
cp libgcc_s*.so stage1
cp libunwind.a libunwind*.so stage1
cp: cannot stat `libunwind.a': No such file or directory
cp: cannot stat `libunwind*.so': No such file or directory
make[2]: [stage1-start] Error 1 (ignored)


mv: cannot stat `libgcc/*.vis': No such file or directory
make[3]: Leaving directory `/home/liux/OpenFOAM/linuxAMD64/tmp/gcc-4.1.0/gcc-4.1.0-obj/gcc'
subdirs="cp build"; for dir in $subdirs; \
do \
if [ -d stage2/$dir ] ; then true ; else mkdir stage2/$dir ; fi ; \
done
rm -f stage2/libgcc.a stage2/libgcov.a stage2/libgcc_eh.a
rm -f stage2/libgcc_s*.so
rm -f stage2/libunwind.a stage2/libunwind*.so
mv specs stage2/specs
mv *.o s-* xgcc cpp cc1 cc1*-dummy crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o gcc-cross protoize unprotoize specs collect2 gcov-iov gcov gcov-dump *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk g++ g++-cross cc1plus stage2
mv: cannot stat `crtbegin.o': No such file or directory
mv: cannot stat `crtbeginS.o': No such file or directory
mv: cannot stat `crtbeginT.o': No such file or directory
mv: cannot stat `crtend.o': No such file or directory
mv: cannot stat `crtendS.o': No such file or directory
mv: cannot stat `crtfastmath.o': No such file or directory
mv: cannot stat `gcc-cross': No such file or directory
mv: cannot stat `protoize': No such file or directory
mv: cannot stat `unprotoize': No such file or directory
mv: cannot stat `specs': No such file or directory
mv: cannot stat `gcov-iov': No such file or directory
mv: cannot stat `*.[0-9][0-9].*': No such file or directory
mv: cannot stat `*.[si]': No such file or directory
mv: cannot stat `g++-cross': No such file or directory
make[2]: [stage2-start] Error 1 (ignored)

mv build/* stage2/build
cp -p insn-flags.h insn-config.h insn-codes.h insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c insn-attr.h insn-attrtab.c insn-opinit.c insn-preds.c insn-constants.h tm-preds.h tree-check.h insn-conditions.c min-insn-modes.c insn-modes.c insn-modes.h genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-gen.h stage2
if [ -f as ] ; then (cd stage2 && ln -s ../as .) ; else true ; fi
if [ -f ld ] ; then (cd stage2 && ln -s ../ld .) ; else true ; fi
if [ -f collect-ld ] ; then (cd stage2 && ln -s ../collect-ld .) ; else true ; fi
cp libgcc.a stage2
ranlib stage2/libgcc.a
cp libgcov.a stage2
ranlib stage2/libgcov.a
if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage2; \
ranlib stage2/libgcc_eh.a; \
fi
cp libgcc_s*.so stage2
cp libunwind.a libunwind*.so stage2
cp: cannot stat `libunwind.a': No such file or directory
cp: cannot stat `libunwind*.so': No such file or directory
make[2]: [stage2-start] Error 1 (ignored)
------------------------------------------------

I did use "which ld" and it pointed to the right location. Can you help with this issue?

John
  Reply With Quote

Old   May 8, 2006, 17:39
Default I did try to use g++ (checked
  #6
liuxi
Guest
 
Posts: n/a
I did try to use g++ (checked to make sure it is 4.1.0) to compile the little and it returned with a link error:

/home/liux/OpenFOAM/linuxAMD64/binutils-2.16.1/lib/../x86_64-unknown-linux-gnu/b in/ld: crtbegin.o: No such file: No such file or directory
collect2: ld returned 1 exit status

John
  Reply With Quote

Old   May 8, 2006, 23:06
Default Hi John, For binutils: con
  #7
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hi John,

For binutils:
configure:2293:18: mpfr.h: No such file or directory

You need to have the package gmp-devel installed.

For gcc:
Looks like you are missing other development packages as well.

Do you have glibc-devel installed?

Do you have enough space in the partition where you are compiling gcc?

Martin
mbeaudoin is offline   Reply With Quote

Old   May 9, 2006, 12:07
Default Martin, I checked gmp-devel
  #8
liuxi
Guest
 
Posts: n/a
Martin,

I checked gmp-devel and glibc-devel by using "rpm -qa" and they do exist (qmp-devel-4.1.2-5 and glibc-devel-2.3.2-95-33).

I have enough disk space in my home directory (~24GB).

I tried to install binutils-2.14 and the error in config.log went way. Then I tried to compile gcc-4.1.0, but got the similar configure error when I tried to run the comfigure command according to your Wiki. I then installed gcc-3.4.6 and the configure error was no longer there.

However, I still got the similar errors during the compilation as follows. I think there might be some environment variables were not set up properly.

John


-------------------------------------------

mv specs stage1/specs
mv *.o s-* xgcc cpp cc1 cc1*-dummy crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o gcc-cross protoize unprotoize specs collect2 gcov-iov gcov gcov-dump *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk g++ g++-cross cc1plus stage1
mv: cannot stat `crtbegin.o': No such file or directory
mv: cannot stat `crtbeginS.o': No such file or directory
mv: cannot stat `crtbeginT.o': No such file or directory
mv: cannot stat `crtend.o': No such file or directory
mv: cannot stat `crtendS.o': No such file or directory
mv: cannot stat `crtfastmath.o': No such file or directory
mv: cannot stat `gcc-cross': No such file or directory
.h tm-preds.h tree-check.h insn-conditions.c min-insn-modes.c insn-modes.c insn-modes.h genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-gen.h stage1
if [ -f as ] ; then (cd stage1 && ln -s ../as .) ; else true ; fi
if [ -f ld ] ; then (cd stage1 && ln -s ../ld .) ; else true ; fi
if [ -f collect-ld ] ; then (cd stage1 && ln -s ../collect-ld .) ; else true ; fi
cp libgcc.a stage1
ranlib stage1/libgcc.a
cp libgcov.a stage1
ranlib stage1/libgcov.a
if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage1; \
ranlib stage1/libgcc_eh.a; \
fi
cp libgcc_s*.so stage1
cp libunwind.a libunwind*.so stage1
cp: cannot stat `libunwind.a': No such file or directory
cp: cannot stat `libunwind*.so': No such file or directory
make[2]: [stage1-start] Error 1 (ignored)
  Reply With Quote

Old   May 9, 2006, 15:25
Default John, What is the output fo
  #9
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
John,

What is the output for the following commands on your AMD64 Redhat Enterprise System:

uname -a

and

cat /proc/version
mbeaudoin is offline   Reply With Quote

Old   May 9, 2006, 15:33
Default Martin, Here is the informa
  #10
liuxi
Guest
 
Posts: n/a
Martin,

Here is the information:

Linux goliath 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:03:28 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

Linux version 2.4.21-32.ELsmp (bhcompile@crowe.devel.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)) #1 SMP Fri Apr 15 21:03:28 EDT 2005

John
  Reply With Quote

Old   May 9, 2006, 16:55
Default John, The workstations I ha
  #11
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
John,

The workstations I have been using for OpenFOAM 1.3 are all based on some variations of the Linux 2.6 kernel.

And all of the different steps specified in the HowTo has been tested using those machines.

I have access to an older RedHat workstation running a Linux 2.4 kernel. It's a x86 workstation though, not a AMD64 like yours.

After verification, on that machine, the include file mpfr.h is missing from the gmp-devel, and the installed version for gmp-devel and glibc-devel are slightly older than yours.

So maybe I will stumble over the same problems you have if I try recompiling binutils and gcc 4.1.0 over there ...

I'll keep you posted.

Martin
mbeaudoin is offline   Reply With Quote

Old   May 10, 2006, 10:20
Default Hello again, The recompilat
  #12
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello again,

The recompilation procedure is valid for a standard RedHat workstation running a Linux 2.4 kernel (Red Hat Linux 8.0 3.2-7, x86). The same on a SuSE system running a 2.4 kernel.

On both systems, I was able to completely recompile binutils-2.16.1 and gcc-4.1.0. I was then able to compile your little "Hello World" program and make it run.

The only little adjustment I had to make was to adapt my LD_LIBRARY_PATH for this test. But you don't have to do this with OpenFOAM, the command source ~/OpenFOAM/OpenFOAM-1.3/. OpenFOAM-1.3/cshrc will take care of that.

The recompilation procedure is working for a large set of Linux based OS: RedHat, SuSE, Debian, 2.6 and 2.4 kernels, x86 and x86_64 variants.

I don't know why it is not working on your system. It should. I am all out of answers.

Some remarks to help you go a little bit further:

1: A strange error message from your LAM configuration:
OPwrite.C:32:17: error: mpi.h: No such file or directory

This cannot happen if you source your ~/OpenFOAM/OpenFOAM-1.3/. OpenFOAM-1.3/cshrc before starting ~/OpenFOAM/OpenFOAM-1.3/Allwmake.

You either:
a: have a syntax error in one of your config file.
b: you are sourcing ~/OpenFOAM/OpenFOAM-1.3/. OpenFOAM-1.3/cshrc in one window, and starting ~/OpenFOAM/OpenFOAM-1.3/Allwmake in another.

Basic stuff, I know, but you need to verify this, and I would really explore that "missing mpi.h" problem first...

2: To make sure your problem are not related to a specific setting with your own default environment variables, try using another "user" or login account on your machine for recompiling OpenFOAM.

3: Finally, if you can, try recompiling on another x86_64 machine. Maybe your RedHat installation is screwed up somehow.

I honestly don't think you need to explore solution #2 and #3.

Resolving the missing "mpi.h" file issue should help you get back on the right track.

Good luck!

Martin
mbeaudoin is offline   Reply With Quote

Old   May 10, 2006, 10:21
Default Martin, I compiled mpfr2.2.
  #13
liuxi
Guest
 
Posts: n/a
Martin,

I compiled mpfr2.2.0 and let the configure point to the newly installed mpfr by using "--with-mpfr=PATH" when I run "configure" commands for binutiles-2.16.1 and gcc-4.1.0. This has solved missing "mpfr.h" issues and I was able to install binutils-2.16.1 cleanly.

For gcc-4.1.0, I passed configure stage. But the error messages still exist when I run make bootstrap. It looks like some packages are still missing.

John

---------------------------------------
mv specs stage1/specs
mv *.o s-* xgcc cpp cc1 cc1*-dummy crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o gcc-cross protoize unprotoize specs collect2 gcov-iov gcov gcov-dump *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk g++ g++-cross cc1plus stage1
mv: cannot stat `crtbegin.o': No such file or directory
mv: cannot stat `crtbeginS.o': No such file or directory
mv: cannot stat `crtbeginT.o': No such file or directory
mv: cannot stat `crtend.o': No such file or directory
mv: cannot stat `crtendS.o': No such file or directory
mv: cannot stat `crtfastmath.o': No such file or directory
mv: cannot stat `gcc-cross': No such file or directory
mv: cannot stat `protoize': No such file or directory
mv: cannot stat `unprotoize': No such file or directory
mv: cannot stat `specs': No such file or directory
mv: cannot stat `gcov-iov': No such file or directory
mv: cannot stat `gcov': No such file or directory
mv: cannot stat `gcov-dump': No such file or directory
mv: cannot stat `*.[0-9][0-9].*': No such file or directory
mv: cannot stat `*.[si]': No such file or directory
mv: cannot stat `g++-cross': No such file or directory
mv: cannot stat `cc1plus': No such file or directory
make[2]: [stage1-start] Error 1 (ignored)
mv build/* stage1/build
  Reply With Quote

Old   May 10, 2006, 10:32
Default Martin, I did try to instal
  #14
liuxi
Guest
 
Posts: n/a
Martin,

I did try to install binutils-2.16.1 and gcc-4.1.0 on a 32bit Pentium PC with Redhat 2.6 kernel. The information is as follows:

I did not have any issues with mpfr.h and binutils-2.16.1 installation was clean. I got the same errors as above mentioned (crtbegin.o, etc.). It looks like our linux system is screwed up somehow.

Thank you again for the great help. I do appreciate it very much. I will keep looking into this issue.

John
----------------------------------------------
uname -a
Linux hempstead 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT 2005 i686 i686 i386 GNU/Linux

cat /proc/version
Linux version 2.6.9-11.ELsmp (bhcompile@decompose.build.redhat.com) (gcc version 3.4.3 20050227 (Red Hat 3.4.3-22)) #1 SMP Fri May 20 18:26:27 EDT 2005
  Reply With Quote

Old   May 10, 2006, 10:32
Default John, I had the missing "mp
  #15
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
John,

I had the missing "mpfr.h" issues on my Linux 2.4 kernel based systems as well.

The configure scripts are simply exploring the basic Linux installation in order "pick and choose" the available components.

You can recompile both binutils-2.16.1 and gcc-4.1.0 without mpfr.h

I did last night on an "older" 2.4 kernel based RedHat 8 workstation.

Martin
mbeaudoin is offline   Reply With Quote

Old   May 31, 2006, 20:03
Default I have also had problems with
  #16
New Member
 
Juan Hierro
Join Date: Mar 2009
Posts: 9
Rep Power: 17
jhierroa is on a distinguished road
I have also had problems with flex. The debian system that I was using had version 2.5.31.

I had to downgrade to 2.5.4 in order to prevent some "yy_current_buffer undefined" errors.
jhierroa is offline   Reply With Quote

Old   June 2, 2006, 16:15
Default Hi, Juan, Finally I am able
  #17
liuxi
Guest
 
Posts: n/a
Hi, Juan,

Finally I am able to compile 1.3 code under binutils 2.16.1 and gcc 4.1.1 according to the following suggestions.

Thank every one who helped me in the past.

John

--------------------------------------------
Posted by hierro@****** on Wednesday, May 31, 2006 - 02:52 pm:

I run into the same problem with a recent debian installation.

If I unset BINUTILS_ROOT the foo.cc program

#include
using namespace std;
int main()
{
cout<<"Hello! World\n";
return 0;
}

compiles without a problem. Otherwise, crtbegin.o is not found.

If that variable is set, in the linking phase crtbegin.o is called
(g++ -v) by its name and not found. If it is unset, it is called (g++
-v) by the FULL PATH to that file and found.

A workaround is to copy all the files (subdirectories are not needed)
from
/your/local/gcc-4.1.0/lib/gcc/x86_64-unknown-linux-gnu/4.1.0

into

/your/local/binutils-2.16.1/x86_64-unknown-linux-gnu/lib

After that, it is not necessary any more to unset
BINUTILS_ROOT in order to compile foo.cc
  Reply With Quote

Old   April 1, 2007, 14:37
Default Hello, I was bitten myself
  #18
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hello,

I was bitten myself by the crtbegin.o problem while compiling OpenFOAM 1.3 on a brand new Centos 4.4 x86_64 platform.

As it was mentioned by other people, the problem lies with the existence or redefinition of the environment variable "BINUTILS_ROOT" at link time.

BINUTILS_ROOT is a "reserved" variable internally used by some of the gcc compiler tools.

I mistakenly reused that variable name, without seeing any side effects on any of my systems, until today.

In the Wiki Howto document about recompiling OpenFOAM under Unix, I now recommend not using or redefining the BINUTILS_ROOT environment variable, but instead to use an environment variable called _BINUTILS_FOR_DEMANGLE_H.

The probability of hitting another environment variable name clash with that one should be fairly minimal...

Martin
mbeaudoin is offline   Reply With Quote

Old   June 16, 2008, 12:46
Default hello evry body! i installed
  #19
Member
 
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17
hamcer is on a distinguished road
hello evry body!
i installed redhat 64 but when i installed OpenFoam 64 i have erroors after typing foaminstallationTest:
if has one personne help me i 'll be very gladed

Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: localhost.localdomain
OS: Linux version 2.6.18-8.el5
User: root
User_config: /root/.bashrc
FATAL ERROR: /root/.OpenFOAM-1.4.1/bashrc does not appear to be sourced from:
/root/.bashrc

You need the following at the end of your /root/.bashrc file:
. /root/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/bashrc
or equivalent depending on the location of the OpenFOAM installation.


FATAL ERROR Foam install directory not set.

Set correct path to installation 'WM_PROJECT_INST_DIR' in /root/.foam2.3/bashrc
-------------------------------------------------------------------------------


Checking main FOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR --------- env variable not set --------- yes
$WM_PROJECT_USER_DIR --------- env variable not set --------- no
$FOAM_JOB_DIR --------- env variable not set --------- yes
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR --------- env variable not set --------- yes

$FOAM_USER_APPBIN --------- env variable not set --------- no
$FOAM_APPBIN --------- env variable not set --------- yes
$WM_DIR --------- env variable not set --------- yes
$FOAMX_PATH --------- env variable not set --------- yes
$CEI_HOME --------- env variable not set --------- no

$JAVA_PATH --------- env variable not set --------- no
$MICO_ARCH_PATH --------- env variable not set --------- yes
$LAM_ARCH_PATH --------- env variable not set --------- yes
$MPICH_ARCH_PATH --------- env variable not set --------- no
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN --------- env variable not set --------- yes
$FOAM_USER_LIBBIN --------- env variable not set --------- no
$LAM_ARCH_PATH --------- env variable not set --------- yes
-------------------------------------------------------------------------------


Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.1.1
WARNING: Conflicting installations:
foam settings: /bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR

java 1.4.2
libgcj)
WARNING: Conflicting installations:
foam settings: /bin/java
current path : /usr/bin/java

gzip 1.3.5 /bin/gzip
tar 1.3.5 /bin/tar
icoFoam *** not installed ***
CRITICAL ERROR

-------------------------------------------------------------------------------


Checking file/directory permissions...
-------------------------------------------------------------------------------
File/directory Set Reqd Crit
-------------------------------------------------------------------------------


Checking networking...
-------------------------------------------------------------------------------
Action Result Crit
-------------------------------------------------------------------------------
...localhost.localdomain Successful yes
Pinging_localHost Successful yes
Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Successful yes
(*) Only one of rsh or ssh is required by the Foam enviroment.

-------------------------------------------------------------------------------

The system test has evoked 1 fatal error(s).

The foam installation contains 2 critical error(s).

Review the output for warning messages and consult
the installation guide for trouble shooting.

[root@localhost bin]# . foamInstallationTest
Executing bash:
hamcer is offline   Reply With Quote

Old   June 16, 2008, 13:59
Default hi every body; i have redhat
  #20
Member
 
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17
hamcer is on a distinguished road
hi every body;
i have redhat 64 linux, and when i tcheking installation for OF i have this message:
thank for help


Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: localhost.localdomain
OS: Linux version 2.6.18-8.el5
User: Hamdi
User_config: /home/Hamdi/.bashrc
Foam_config: /home/Hamdi/.OpenFOAM-1.4.1/bashrc sourced correctly.
-------------------------------------------------------------------------------


Checking main FOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/Hamdi/OpenFOAM yes yes
$WM_PROJECT_USER_DIR /home/Hamdi/OpenFOAM/Hamdi-1.4.1 yes no
$FOAM_JOB_DIR /home/Hamdi/OpenFOAM/jobControl no yes
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR /home/Hamdi/OpenFOAM/OpenFOAM-1.4.1 yes yes yes

$FOAM_USER_APPBIN ...1.4.1/applications/bin/linuxGccDPOpt yes yes no
$FOAM_APPBIN ...1.4.1/applications/bin/linuxGccDPOpt yes yes yes
$WM_DIR .../Hamdi/OpenFOAM/OpenFOAM-1.4.1/wmake yes yes yes
$FOAMX_PATH ...ations/utilities/preProcessing/FoamX yes no yes
$CEI_HOME /usr/local/ensight/CEI no no

$JAVA_PATH /home/Hamdi/OpenFOAM/linux/j2sdk1.4.2_05 yes yes no
$MICO_ARCH_PATH .../mico-2.3.12/platforms/linuxGccDPOpt no yes
$LAM_ARCH_PATH --------- env variable not set --------- yes
$MPICH_ARCH_PATH --------- env variable not set --------- no
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN ...OAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt yes yes yes
$FOAM_USER_LIBBIN ...enFOAM/Hamdi-1.4.1/lib/linuxGccDPOpt yes yes no
$LAM_ARCH_PATH --------- env variable not set --------- yes
-------------------------------------------------------------------------------


Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.1.1
WARNING: Conflicting installations:
foam settings: /home/Hamdi/OpenFOAM/linux/gcc-4.2.1-64/bin/gcc
current path : /usr/bin/gcc
CRITICAL ERROR

java 1.4.2_05 /home/Hamdi/OpenFOAM/linux/j2sdk1.4.2_05/bin/java
gzip 1.3.5 /usr/bin/gzip
tar 1.3.5 /bin/tar
icoFoam *** not installed ***
CRITICAL ERROR

-------------------------------------------------------------------------------


Checking file/directory permissions...
-------------------------------------------------------------------------------
File/directory Set Reqd Crit
-------------------------------------------------------------------------------


Checking networking...
-------------------------------------------------------------------------------
Action Result Crit
-------------------------------------------------------------------------------
...localhost.localdomain Successful yes
Pinging_localHost Successful yes
Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Successful yes
(*) Only one of rsh or ssh is required by the Foam enviroment.

-------------------------------------------------------------------------------

Base configuration ok.

The foam installation contains 2 critical error(s).

Review the output for warning messages and consult
the installation guide for trouble shooting.
hamcer is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling OpenFOAM13 on AMD64 with OpenSUSE 101 silent_missile OpenFOAM Installation 5 August 10, 2007 08:31
Installation of OpenFOAM14 on Redhat Enterprise 14 gtg627e OpenFOAM Installation 2 July 23, 2007 11:37
FoamX libssl problem on redhat enterprise braennstroem OpenFOAM Installation 5 June 21, 2007 10:00
[OpenFOAM] Has anyone had luck with paraFoam on RedHat Enterprise AMD64 platform sek ParaView 9 August 29, 2006 13:28
Assembler messages when compiling on AMD64 hani OpenFOAM 4 May 22, 2006 09:08


All times are GMT -4. The time now is 11:02.