LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-20-2019, 08:36 PM   #1
anon196
LQ Newbie
 
Registered: Oct 2017
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 07-20-2019, 11:53 PM   #2
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
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.
 
1 members found this post helpful.
Old 07-23-2019, 05:22 AM   #3
anon196
LQ Newbie
 
Registered: Oct 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-23-2019, 05:29 AM   #4
Labinnah
Member
 
Registered: May 2014
Location: Łódź, Poland
Distribution: Slackware-current
Posts: 185

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by K4Werri View Post
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
 
1 members found this post helpful.
Old 07-23-2019, 07:35 AM   #5
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Quote:
Originally Posted by K4Werri View Post
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.
 
1 members found this post helpful.
Old 07-28-2019, 08:09 AM   #6
anon196
LQ Newbie
 
Registered: Oct 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks ...

K.
 
Old 08-25-2019, 09:12 AM   #7
Bad Blue Bull
Member
 
Registered: Jul 2017
Distribution: Slackware64-current
Posts: 85

Rep: Reputation: Disabled
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...
 
Old 08-26-2019, 01:14 AM   #8
anon196
LQ Newbie
 
Registered: Oct 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks.

I suspect fortran will be 'round for a while yet ...
 
Old 08-26-2019, 08:17 AM   #9
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
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.

Last edited by montagdude; 08-26-2019 at 08:24 AM.
 
Old 08-26-2019, 09:14 AM   #10
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by montagdude View Post
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!
 
1 members found this post helpful.
  


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 Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration