LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 14.2 and libgfortran4? (https://www.linuxquestions.org/questions/slackware-14/slackware-14-2-and-libgfortran4-4175657773/)

anon196 07-20-2019 08:36 PM

Slackware 14.2 and libgfortran4?
 
I'm wanting to use a piece of software that requires "libgfortran4".

I'm using Slackware 14.2 (updated using slackpkg).

I see that /usr/lib64 contains libgfortran.so.3 which is an earlier version of the fortran library than I require.

As best as I can workout, to get libgfortran4, I need to install gcc 7 or higher (including the fortran parts) to get libgfortran4.

I have a few questions.

Can I safely install a different version of gcc on my system? How would I do this? Or, should I remove the current version of gcc and install the later version? Is this safe?

Thanks in advance.

K.

montagdude 07-20-2019 11:53 PM

I would recommend installing a newer GCC locally (somewhere under $HOME), and then pointing your other software to it with LD_LIBRARY_PATH at runtime. Compiling GCC locally is not hard, and you can take a look at Pat's Slackbuild for configure flags if you like.

anon196 07-23-2019 05:22 AM

Thanks for your response. I get it re install it somewhere out of the way and point to it when required.

I did not understand '... Pat's Slackbuild for configure flags if you like ...'. I understand the notion of a Slackbuild script as I use things from slackbuilds.org. Do you mean the build script that's used to build the packages in the dsitribution? If so, where would I find those?

Thanks again for your suggestion.

Regards.

K.

Labinnah 07-23-2019 05:29 AM

Quote:

Originally Posted by K4Werri (Post 6017791)
Do you mean the build script that's used to build the packages in the dsitribution? If so, where would I find those?

At any Slackware mirror you want. I.e. here:
ftp://ftp.slackware.com/pub/slackwar...t/source/d/gcc

montagdude 07-23-2019 07:35 AM

Quote:

Originally Posted by K4Werri (Post 6017791)
Thanks for your response. I get it re install it somewhere out of the way and point to it when required.

I did not understand '... Pat's Slackbuild for configure flags if you like ...'. I understand the notion of a Slackbuild script as I use things from slackbuilds.org. Do you mean the build script that's used to build the packages in the dsitribution? If so, where would I find those?

Thanks again for your suggestion.

Regards.

K.

I meant download Pat's Slackbuild script for gcc (i.e., at the location Labinnah linked) and take a look at what options he passes to gcc's configure script. They are:

Code:

configure --prefix=/usr \
    --libdir=/usr/lib$LIBDIRSUFFIX \
    --mandir=/usr/man \
    --infodir=/usr/info \
    --enable-shared \
    --enable-bootstrap \
    --enable-languages=ada,brig,c,c++,d,fortran,go,lto,objc,obj-c++ \
    --enable-threads=posix \
    --enable-checking=release \
    --enable-objc-gc \
    --with-system-zlib \
    --enable-libstdcxx-dual-abi \
    --with-default-libstdcxx-abi=new \
    --disable-libstdcxx-pch \
    --disable-libunwind-exceptions \
    --enable-__cxa_atexit \
    --disable-libssp \
    --enable-gnu-unique-object \
    --enable-plugin \
    --enable-lto \
    --disable-install-libiberty \
    --disable-werror \
    --with-gnu-ld \
    --verbose \
    --with-arch-directory=$LIB_ARCH \
    --disable-gtktest \
    --enable-clocale=gnu \
    $GCC_ARCHOPTS \
    --target=${TARGET} \
    --build=${TARGET} \
    --host=${TARGET}

If you were going to build GCC locally, you could use some or all of those, but replace the variables (denoted with $) appropriately and change --prefix to the location where you intend to install it.

anon196 07-28-2019 08:09 AM

Thanks ...

K.

Bad Blue Bull 08-25-2019 09:12 AM

I've taken this lib from this archive: http://gfortran.meteodat.ch/download/x86_64/releases/gcc-7.1.0.tar.xz

We're living in 2019 and Fortran is still alive and causes troubles for us...

anon196 08-26-2019 01:14 AM

Thanks.

I suspect fortran will be 'round for a while yet ...

montagdude 08-26-2019 08:17 AM

Fortran isn't so bad. It's an easy-to-learn, high-performance language with lots of math and engineering functions built-in, particularly multi-dimensional arrays and vector/matrix math. Considering the number of math libraries built on it, even targeting other languages (e.g., SciPy), I suspect K4Werri is right.

But yes, there is a lot of ugly legacy Fortran code out there.

ehartman 08-26-2019 09:14 AM

Quote:

Originally Posted by montagdude (Post 6029633)
But yes, there is a lot of ugly legacy Fortran code out there.

That's the disadvantage of being around that long: the Fortran language has matured quite a bit, but the old code stays around (in the old format).
You wouldn't invent a arithmatic if or a computed goto nowadays in a more modern language!


All times are GMT -5. The time now is 11:19 AM.