Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Problems with gcc 4.7.0 after an update to Fedora 17


    I'm using a computer for which I have no control over its updates, and do not even have root access. It was recently updated to Fedora 17 (I am not sure whether it was running Fedora 15 or 16 before, but I can find out if it's important). I'm running into problems reinstalling a Perl module which says it needs recompilation, and the errors look to trace back to gcc 4.7.0. I had another error with gcc 4.7.0 after the update as well, but it was fixed using a symlink... I'm not sure whether that's the best fix. Details are below.

    I should mention that I'm relatively new to installing packages on Linux machines, so sorry for any Newbie mistakes!

    Here are some details.

    Before the update, both the Perl module which is now giving me errors and gcc 4.7.0 were working perfectly.

    Now, when I check for the Perl modules PDL::LinearAlgebra and Astro::Cosmology, I get an error that I need to recompile them against the newly installed PDL. This is apparantly a known error with the update, and the solution is simply to recompile them. Updating Astro::Cosmology worked, but when I try to update PDL::LinearAlgebra I get errors. I used the command <perl -MCPAN -e 'force("install", "PDL::LinearAlgebra")'>. The make failed: after a call to gcc involving -llapack and -lblas, I get errors that it can not find -llapack and -lblas. The end of the output is below.

    gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wl,-z,relro Trans.o -o ../blib/arch/auto/PDL/LinearAlgebra/Trans/ \
    -llapack -lblas \

    /usr/bin/ld: cannot find -llapack
    /usr/bin/ld: cannot find -lblas
    collect2: error: ld returned 1 exit status
    make[1]: *** [../blib/arch/auto/PDL/LinearAlgebra/Trans/] Error 1
    make[1]: Leaving directory `/nfs/isluga1/home/dpineau/.local/share/.cpan/build/PDL-LinearAlgebra-0.06-AD7vXU/Trans'
    make: *** [subdirs] Error 2
    /usr/bin/make -- NOT OK
    'YAML' not installed, will not store persistent state
    Running make test
    Can't test without successful make
    Running make install
    Make had returned bad status, install seems impossible

    When I run 'locate lapack' and 'locate blas', a lot of directories come up. So, it seems that these packages are there.

    I had other errors with gcc 4.7.0 as well: when I tried to recompile a program which I'd compiled before the update (and had not changed since the last compile), I got an error that the shared library could not be opened. Specifically, the output error was as follows.

    /nfs/isluga1/home/dpineau/BHevoSim2012/Galacticus/almuhit/installs/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1: error while loading shared libraries: cannot open shared object file: No such file or directory

    I asked the person who manages our computer systems if knew about this or knew of a solution (after looking some things up online), and he added a symlink using: <ln -s>. Now, I've read on some Linux forums that symlinks are horribly bad. However, he thinks it's fine and after checking my /usr/lib64 directory I can see that he uses them all the time: that directory contains many symlinks named as older versions of libgmp. I do not know if this is part of the problem, but I'd have to have a pretty strong reason to get him to remove all these symlinks (I am just a student; I have no power :P ).

    Since this fix, the old program compiles correctly again. However, I mentioned it in case it could be related to the problem in reinstalling the Perl module.

    Does anyone know how to fix this problem? Thank you!

  2. #2
    Hello and welcome!

    I don't believe your problem is gcc, I think it is simply some missing libraries.

    /usr/bin/ld: cannot find -llapack
    /usr/bin/ld: cannot find -lblas
    These two libraries are installed via the lapack-devel and blas-devel packages, respectively. Here is a list of files belonging to them:
    # rpm -ql lapack-devel
    # rpm -ql blas-devel
    Check for those files, particularly the ones in /usr/lib. Note that it might be in /usr/lib64/ (and probably is in your case). If they're not there, hopefully you or your admin can install them, e.g.:

    yum install lapack-devel blas-devel
    If the admin won't and you can't, you can always manually download the RPM files, uncompress them to your own directory, and tell gcc where to find them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts