Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[Solved ] no g77 albeit fortran use flag is set!

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
byakuya
n00b
n00b
User avatar
Posts: 27
Joined: Thu Nov 09, 2006 11:01 am

[Solved ] no g77 albeit fortran use flag is set!

  • Quote

Post by byakuya » Tue Nov 14, 2006 2:29 am

I have both f77 and fortran in my USE flags, I tried recompiling gcc, also tried adding --deep & --newuse, tried emerging world. Nope. I don't have a fortran compiler. Here's my emerge --info

Code: Select all

Portage 2.1.1-r1 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.6
Last Sync: Fri, 10 Nov 2006 01:47:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://adelie.polymtl.ca/ http://gentoo.arcticnetwork.ca/ http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LINGUAS="tr en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac acpi aiglx alsa arts asf berkdb bitmap-fonts cdb cdr cli cracklib crypt ctype cups curl dlloader dri dvdr elibc_glibc emacs encode exif f77 ffmpeg fortran ftp gcj gdbm glitz gmp gnome gpm gtk iconv ieee1394 input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg kde kernel_linux libg++ linguas_en linguas_tr mad matroska matrox mikmod mng mp3 mpeg mysql ncurses nls nptl nptlonly ogg openal opengl pam pcre pdf perl php png ppds pppd python qt qt3 quicktime readline reflection samba session sockets spl sql ssl tcpd tetex tk truetype-fonts type1-fonts udev unicode usb userland_GNU vcd video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i810 video_cards_mga video_cards_neomagic video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vorbis xcomposite xine xorg xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Last edited by byakuya on Sun Nov 19, 2006 11:57 am, edited 1 time in total.
Top
Phenax
l33t
l33t
User avatar
Posts: 972
Joined: Fri Mar 10, 2006 8:12 pm

  • Quote

Post by Phenax » Tue Nov 14, 2006 2:31 am

Code: Select all

gfortran
Top
byakuya
n00b
n00b
User avatar
Posts: 27
Joined: Thu Nov 09, 2006 11:01 am

  • Quote

Post by byakuya » Tue Nov 14, 2006 2:11 pm

Good, it works. But

Code: Select all

emerge octave
Calculating dependencies... done!

>>> Emerging (1 of 1) sci-mathematics/octave-2.1.69 to /
 * octave-2.1.69.tar.bz2 size ;-) ...                                     [ ok ]
 * octave-2.1.69.tar.bz2 RMD160 ;-) ...                                   [ ok ]
 * octave-2.1.69.tar.bz2 SHA256 ;-) ...                                   [ ok ]
 * octave-2.1.69.tar.bz2 MD5 ;-) ...                                      [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking octave-2.1.69.tar.bz2 ;-) ...                                 [ ok ]
which: no g77 in (/usr/local/sbin:/sbin:/usr/sbin:/usr/lib/portage/bin:/usr/local/bin:/bin:/usr/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin)
 * No fortran compiler found on the system!
 * Please add fortran to your USE flags and reemerge gcc!

!!! ERROR: sci-mathematics/octave-2.1.69 failed.
Call stack:
  ebuild.sh, line 1562:   Called dyn_setup
  ebuild.sh, line 665:   Called pkg_setup
  octave-2.1.69.ebuild, line 40:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.
Top
Fred Krogh
Veteran
Veteran
Posts: 1036
Joined: Mon Feb 07, 2005 11:50 pm
Location: Tujunga, CA
Contact:
Contact Fred Krogh
Website

  • Quote

Post by Fred Krogh » Tue Nov 14, 2006 2:37 pm

In order to have a bunch of my old make files work, I did
ln -s /usr/bin/gfortran-4.1.1 /usr/bin/g77
Probably not the best solution, but it works for me. This soft link will need to be updated when there is a new version of gfortran.
Fred
Top
didl
Retired Dev
Retired Dev
User avatar
Posts: 1106
Joined: Tue Sep 09, 2003 11:01 pm
Location: Pittsburgh, PA

  • Quote

Post by didl » Tue Nov 14, 2006 2:58 pm

byakuya wrote:Good, it works. But

!!! ERROR: sci-mathematics/octave-2.1.69 failed.
Call stack:
ebuild.sh, line 1562: Called dyn_setup
ebuild.sh, line 665: Called pkg_setup
octave-2.1.69.ebuild, line 40: Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.
You need >=octave-2.1.73 with gcc-4.1.1 and gfortran. This version is now stable
on all arches but alpha.
Top
ilm
Guru
Guru
User avatar
Posts: 310
Joined: Thu Jun 29, 2006 2:54 am
Location: Brisbane, Australia

  • Quote

Post by ilm » Tue Nov 14, 2006 11:14 pm

I did a similar thing to Fred Krogh, but instead linked to gfortran rather than any specific version:
ln -s /usr/bin/gfortran /usr/bin/g77
Top
anjames
Tux's lil' helper
Tux's lil' helper
Posts: 115
Joined: Fri Jul 30, 2004 4:48 am
Location: San Diego, CA
Contact:
Contact anjames
Website

  • Quote

Post by anjames » Wed Dec 06, 2006 12:03 am

OK, that is fine that we can use gfortran instead of g77, but if we run

Code: Select all

user@host ~/egsnrc/dosrznrc $ gfortran --version
GNU Fortran 95 (GCC) 4.1.1 (Gentoo 4.1.1)
Copyright (C) 2006 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
it becomes obvious why users might want g77 still. Last I checked, there were enough errors in the GNU Fortran 95 that many users stuck with Fortran 77.

Is it now impossible to get back to GNU Fortran 77, or is there a trick to make both g77 AND g95 compile?

In particular, I'm having a problem with a recent fortran code:

Code: Select all

At line 18039 of file dosrznrc_i686-pc-linux-gnu-gfortran.F
Fortran runtime error: Bad value during integer read
I thought I'd have a stab at compiling with g77 instead of g95, but I'll have to figure out how to get g77 back first now.

Blimey
Top
boglin
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 07, 2002 1:57 am
Location: Kingston, ON

getting gfortran and g77 installed concurrently

  • Quote

Post by boglin » Thu Jan 18, 2007 10:19 pm

anjames wrote: it becomes obvious why users might want g77 still. Last I checked, there were enough errors in the GNU Fortran 95 that many users stuck with Fortran 77.

Is it now impossible to get back to GNU Fortran 77, or is there a trick to make both g77 AND g95 compile?
Blimey
Agreed. I wasn't able to compile pgplot with gfortran, so I needed to solve this problem too. Thanks to slotted packages in gentoo, we are able to have several version of gcc installed on our systems. I checked another machine I use and found that g77 is still available on gcc-3.4.6. So I did the following on my g77-less machine:

Code: Select all

#emerge -av "<gcc-4"
I was offered gcc-3.4.6-r1; I accepted. Then comes something not nearly as pretty (a hack). But it will work until you upgrade the newly created 'slotted' gcc.

Code: Select all

#cd /usr/bin
#ln -s `which g77-3.4.6` g77
So now you'll have a g77 in your path and any ebuild requiring g77 will go forth without complaints.

EDIT: I later discovered that this isn't the end of your problems. When linking a with a library compiled with your g77-3.4.6, you may need the use of libg2c; the tell-tale sign is complaints about missing symbols like 's_cmp'... Luckily when the gcc developers moved to gfortran they moved their 4.1 stuff into libgfortran, so you can safely have the libg2c.*'s in you /usr/lib. So I also did the following:

Code: Select all

#cd /usr/lib
#for i in /usr/lib/gcc/<gcc-profile>/<gcc-version>/libg2c.*; do ln -s ${i} ; done
Last edited by boglin on Thu Feb 01, 2007 5:23 am, edited 1 time in total.
Top
butters
Guru
Guru
User avatar
Posts: 427
Joined: Mon May 13, 2002 9:07 am
Location: Poughkeepsie, NY

  • Quote

Post by butters » Sun Jan 28, 2007 1:41 am

I never thought I would run into a fortran problem, but libsamplerate depends of fftw which is giving me the fortran error with GCC-4.1.1. But I can't find an ebuild in the current Portage tree called gfortran, or anything like that using emerge -S fortran. Hints?
If tugboats were bigger, they'd be the ones getting tugged.
Top
ilm
Guru
Guru
User avatar
Posts: 310
Joined: Thu Jun 29, 2006 2:54 am
Location: Brisbane, Australia

  • Quote

Post by ilm » Sun Jan 28, 2007 3:12 am

To get gfortran, emerge gcc with the fortran USE flag set.
Top
surnu
n00b
n00b
Posts: 15
Joined: Wed Jan 24, 2007 11:51 am

  • Quote

Post by surnu » Thu Feb 08, 2007 7:24 am

just remove gfortran executable, it is old 3.x gcc file. I think problem arise when you upgrade to gcc 4.1.1 and then remove old gcc3.x in your system.
rm /usr/bin/gfortran
Top
ilm
Guru
Guru
User avatar
Posts: 310
Joined: Thu Jun 29, 2006 2:54 am
Location: Brisbane, Australia

  • Quote

Post by ilm » Thu Feb 08, 2007 9:12 am

surnu wrote:just remove gfortran executable, it is old 3.x gcc file. I think problem arise when you upgrade to gcc 4.1.1 and then remove old gcc3.x in your system.
rm /usr/bin/gfortran
Isn't g77 the old 3.* gcc fortran compiler, and gfortran the new 4.* gfortran compiler (see comments above about octave not emerging after gcc was upgraded)?
Top
surnu
n00b
n00b
Posts: 15
Joined: Wed Jan 24, 2007 11:51 am

  • Quote

Post by surnu » Thu Feb 08, 2007 9:30 am

ilm wrote:
surnu wrote:just remove gfortran executable, it is old 3.x gcc file. I think problem arise when you upgrade to gcc 4.1.1 and then remove old gcc3.x in your system.
rm /usr/bin/gfortran
Isn't g77 the old 3.* gcc fortran compiler, and gfortran the new 4.* gfortran compiler (see comments above about octave not emerging after gcc was upgraded)?
nope symlink ( /usr/bin/gfortran-4.1.1 ) is correct one, if you look editor /usr/bin/gfortran it says it belong gcc 3.4.6, and /usr/bin/gfortran looks like a wrapper for deal g77.

i found that /usr/bin/i686-pc-linux-gnu-gfortran is also old gcc part
Last edited by surnu on Thu Feb 08, 2007 10:17 am, edited 1 time in total.
Top
ilm
Guru
Guru
User avatar
Posts: 310
Joined: Thu Jun 29, 2006 2:54 am
Location: Brisbane, Australia

  • Quote

Post by ilm » Thu Feb 08, 2007 9:33 am

I take it back, you're right (I only bothered to uninstall gcc 3.* after I stopped using fortran for one of my university subjects, so I didin't notice)...

Though I would have thought that the gcc-4.* emerge would symlink to gfortran for people to use, so that they don't have to worry about version numbers when coding :?
Top
Post Reply

14 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic