Menu

#81 Help with invalid relocation type 42

1.0
open
None
2022-12-13
2022-12-13
zonexo
No

Hi,

I'm trying to install OpenFOAM extend 5.0.

For a number of libs, I keep getting the invalid relocation type 42 error:

+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
BFD: /home/projects/11001845/foam/foam-extend-5.0/ThirdParty/rpmBuild/BUILDROOT/bison-2.7-linux64GccDPInt32Opt.x86_64/home/projects/11001845/foam/foam-extend-5.0/ThirdParty/packages/bison-2.7/platforms/linux64GccDPInt32Opt/lib/liby.a(yyerror.o): invalid relocation type 42
/usr/bin/strip: yyerror.o: Bad value
error: Bad exit status from /home/projects/11001845/foam/foam-extend-5.0/ThirdParty/rpmBuild/tmp/rpm-tmp.DpvXMZ (%install)


RPM build errors:
    Bad exit status from /home/projects/11001845/foam/foam-extend-5.0/ThirdParty/rpmBuild/tmp/rpm-tmp.DpvXMZ (%install)
Installing package: bison-2.7
  Uninstalling bison-2.7 using RPM: bison-2.7-linux64GccDPInt32Opt.x86_64
  Installing bison-2.7 using RPM file: /home/projects/11001845/foam/foam-extend-5.0/ThirdParty/rpmBuild/RPMS/x86_64/bison-2.7-linux64GccDPInt32Opt.x86_64.rpm
error: open of /home/projects/11001845/foam/foam-extend-5.0/ThirdParty/rpmBuild/RPMS/x86_64/bison-2.7-linux64GccDPInt32Opt.x86_64.rpm failed: No such file or directory

Someone in forums said that it's due to old binutils < 2.25 but my cluster is using 2.26.

Btw, I tried using my cluster's gcc 4.9.3 with openmpi 1.0.2, and also my own gcc 12.2 with openmpi 4.1.4. Both had similar error.

My cluster has foam extend 4.0 but I'm not sure how it was compiled in the 1st place since the admin who installed it is no longer with us.

For my current installation, my steps for gcc 4.9.3 are:

cd /home/projects/11001845/foam/foam-extend-5.0
module purge
module load gcc/4.9.3 cuda/10.1 cmake/3.14.4 python/3.5.1 zlib/1.2.8 openmpi/gcc493/1.10.2
export WM_NCOMPPROCS=24
source etc/bashrc

I can do auto install with third party:

./Allwmake.firstInstall &> log_install_051222.txt

A no of libs such as bison and Mesquite will fail

or I can manually install third party 1st:

cd ThirdParty/

./AllClean.stage1

./AllMake.stage0

./AllMake.stage1

It will 1st fail during the bison 2.7 installation with the invalid relocation type 42 error

Discussion

  • Hrvoje Jasak

    Hrvoje Jasak - 2022-12-13
    • assigned_to: Hrvoje Jasak
     
  • Hrvoje Jasak

    Hrvoje Jasak - 2022-12-13

    What operating system are you on? Can you confirm as many of the variables as you can, eg. compiler, linker binutils etc?
    If I am reading this right, your bison isn't working either, meaning that there is something fundamentally broken with your installation.
    For the record, I am on Ubuntu-20.04 and 22.04 and stuff works. There were some problems with gcc-12, but it seems the compiler is broken.

     
  • zonexo

    zonexo - 2022-12-13

    Hi Hrvoje, thanks for the prompt reply. I've always wanted to try foam extend but my installation (4.1, 5.0) both failed, with similar errors.

    My OS is as follows:
    LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
    Distributor ID: RedHatEnterpriseServer
    Description: Red Hat Enterprise Linux Server release 6.10 (Santiago)
    Release: 6.10
    Codename: Santiago

    I have tried both gcc 12.2.2 and my cluster's gcc 4.9.3. But maybe we'll focus on the 4.9.3 version.

    [tsltaywb@nus03 ~]$ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/app/gcc/4.9.3/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
    Target: x86_64-unknown-linux-gnu
    Configured with: ./configure --prefix=/app/gcc/4.9.3 --with-isl=/app/isl/0.14 --with-mpc=/app/mpc/1.0.3 --with-mpfr=/app/mpfr/3.1.4 --with-gmp=/app/gmp/6.1.0
    Thread model: posix
    gcc version 4.9.3 (GCC)

    I'm also using openmpi 1.10.2.

    These are the modules loaded:

    Currently Loaded Modulefiles:
    1) binutils/2.26 3) mpfr/3.1.4 5) isl/0.14 7) cuda/10.1 9) mkl/gcc 11) zlib/1.2.8
    2) gmp/6.1.0 4) mpc/1.0.3 6) gcc/4.9.3 8) cmake/3.14.4 10) python/3.5.1 12) openmpi/gcc493/1.10.2

    My system admin told me bison 2.4.1 is installed sys wide.

    Hope these info are sufficient.

     

Log in to post a comment.