Opened 8 years ago

Closed 5 years ago

#40621 closed defect (fixed)

Octave fails to upgrade with fortran compiler error (illegal instruction)

Reported by: urilabob@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: someuser12, kurtjaeke@…, cooljeanius (Eric Gallager)
Port: octave

Description

OSX 10.6.8 octave @3.2.4_16 attempting to build octave-3.2.4_16+atlas+gcc47.darwin_10.x86_64 the log file tells me to file a ticket; I can't find any previous filings of this problem, so I'm attaching the log file.

Attachments (8)

main.log (8.9 KB) - added by urilabob@… 8 years ago.
log file of updating octave
main.2.log (184.6 KB) - added by urilabob@… 8 years ago.
Log of installing octave
main.3.log (329.8 KB) - added by urilabob@… 8 years ago.
Log of installing octave-devel
main.4.log (321.5 KB) - added by essandess (Steve Smith) 8 years ago.
main.5.log (335.8 KB) - added by urilabob@… 7 years ago.
Similar error using dragonegg
main.6.log (182.2 KB) - added by grg.dll@… 7 years ago.
here is the log file
main.7.log (328.2 KB) - added by grg.dll@… 7 years ago.
and this is the log
gdb_result.txt (139.7 KB) - added by grg.dll@… 7 years ago.

Download all attachments as: .zip

Change History (42)

Changed 8 years ago by urilabob@…

Attachment: main.log added

log file of updating octave

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Port: octave added; Octave removed

This is not a clean build. Please clean the port and try again. Attach the new main.log if it fails.

Is your macports installation on a drive other than the boot drive?

comment:2 Changed 8 years ago by Veence (Vincent)

This seems to be a bug in gcc/gfortran-4.7. Try to use gfortran-4.8 instead.

comment:3 in reply to:  1 Changed 8 years ago by urilabob@…

Replying to macsforever2000@…:

This is not a clean build. Please clean the port and try again. Attach the new main.log if it fails.

Is your macports installation on a drive other than the boot drive?

My apologies. I had uninstalled octave so that update would work again, so I can't now update it. However I have cleaned octave, and on a reinstall, I still get the same problem. Please see newly attached log.

Changed 8 years ago by urilabob@…

Attachment: main.2.log added

Log of installing octave

comment:4 in reply to:  2 Changed 8 years ago by urilabob@…

Replying to vince@…:

This seems to be a bug in gcc/gfortran-4.7. Try to use gfortran-4.8 instead.

Thanks Vince. Unfortunately the problem persists in 4.8 (see new log)

comment:5 in reply to:  1 Changed 8 years ago by urilabob@…

Replying to macsforever2000@…:

Is your macports installation on a drive other than the boot drive?

I have set it up as per advice at https://lists.macosforge.org/pipermail/macports-users/2013-August/033218.html i.e. I have moved the contents of /opt/local/var/macports to the external drive, and correspondingly set portdbpath. It seems to be working for everything except octave.

comment:6 Changed 8 years ago by urilabob@…

Hmmm, based on further reading, it seems I should have installed octave-devel anyhow for the features I need. Doing that now. So maybe this problem is moot (at least for me) - unless the same problem shows up in octave-devel.

comment:7 Changed 8 years ago by urilabob@…

Uh-oh, I'm getting a similar error in installing octave-devel (same compiler error, but in a different routine, genbet.f). Log is attached. I'm guessing that I may need to reinstall gfortran, but I've no idea how to do so. Any suggestions?

Changed 8 years ago by urilabob@…

Attachment: main.3.log added

Log of installing octave-devel

comment:8 in reply to:  description Changed 8 years ago by essandess (Steve Smith)

Replying to urilabob@…:

OSX 10.6.8 octave @3.2.4_16 attempting to build octave-3.2.4_16+atlas+gcc47.darwin_10.x86_64 the log file tells me to file a ticket; I can't find any previous filings of this problem, so I'm attaching the log file.

+1 for octave and octave-devel. main.log attached.

Changed 8 years ago by essandess (Steve Smith)

Attachment: main.4.log added

comment:9 Changed 8 years ago by urilabob@…

Hi S.T., and welcome to the club 8). Your data really helps in triangulating the problem, since it's clearly not due to the OSX 10.6 I am using (your version seems to be 10.8) or my use of an external drive for the build files (you appear to be building in the standard places). But it's a bit weird that no-one else is reporting it. One possibility is that no-one else is using (or at least updating) octave. The more likely possibility is that we have some other common factor that is causing the problem. I guess my xcode could be a little out-of-date (not sure when it got its last software update, I assume apple have dropped maintenance for it by now). Is your xcode up-to-date? If not, updating it might cure your problem (and tell me where mine derives from). Other than that, I really can't think of any other way in which my installation might be nonstandard.

It's a big issue for me though, I really need octave. It's serious enough that I am looking at linux laptops - I could get one and give my macbook to my wife (she doesn't need octave). But it'll be a bit of a wrench, as a mac has always been my primary machine, since way back in 1985.

Cheers, Bob

comment:10 Changed 8 years ago by Veence (Vincent)

Xcode does not matter here, since the problem is tied to the fortran compiler, gfortran, which is gcc (and not clang). It may run with dragonegg-3.3-gcc-4.8. First install llvm-3.3 then clang-3.3 then dragonegg-3.3-gcc-4.8. Stay tuned. I will see what’s necessary to do in order to switch from gfortran to dragonegg tomorrow.

comment:11 Changed 8 years ago by Veence (Vincent)

Try this: install the ports I mentioned above. Now edit octave Portfile and change line 208 from

configure.f77 ${prefix}/bin/gfortran-mp-${ver}

to

configure.f77 ${prefix}/bin/dragonegg-3.3-gfortran-mp-${ver}

and try installing octave with the +gcc48 variant.

comment:12 Changed 8 years ago by kurtjaeke@…

This looks like a duplicate of #40439.

comment:13 Changed 7 years ago by someuser12

Cc: macosx12345@… added

Cc Me!

comment:14 in reply to:  11 Changed 7 years ago by urilabob@…

Thanks Vince; sorry for the delay, I've been away and without access to a high-enough-speed internet connection. I tried your suggestion, but still got:

:info:build f951: internal compiler error: Abort trap:info:build gfortran-mp-4.8: internal compiler error: Abort trap (program f951)
:info:build ../libtool: line 1125: 79017 Abort trap              /opt/local/bin/dragonegg-3.3-gfortran-mp-4.8 -pipe -Os -m64 -pipe -Os -m64 -c ranlib/genbet.f -fno-common -o ranlib/.libs/genbet.o

I'll attach the full log.

I only partially understand macports (using it by analogy with yum and aptitude rather than deep understanding), so I may have missed something. But it looks to me like the problem may lie in some component shared between gfortran and dragonegg-gfortran, rather than at a deeper level (if it were the same bug as #40439, as suggested by kurtjaeke, then I guess switching from gcc to clang should have fixed it, no?).

Replying to vince@…:

Try this: install the ports I mentioned above. Now edit octave Portfile and change line 208 > to

configure.f77 ${prefix}/bin/dragonegg-3.3-gfortran-mp-${ver}

and try installing octave with the +gcc48 variant.

Changed 7 years ago by urilabob@…

Attachment: main.5.log added

Similar error using dragonegg

comment:15 Changed 7 years ago by urilabob@…

Oh by the way, I tried the uninstall/reinstall of gmp, as suggested at #40439; it didn't help... which may provide further confirmation that it's a different bug.

comment:16 Changed 7 years ago by urilabob@…

Further info: I have reduced the problem. Under the command:

/opt/local/bin/gfortran-mp-4.8 genbet.f -o genbet.o

This program generates a compiler crash:

      REAL FUNCTION genbet()
      PARAMETER (expmx=87.1)
      WRITE (*,*) 'Hello World'
      RETURN
      END

This program compiles and (correctly) gives an error about a missing main program:

      REAL FUNCTION genbet()
      PARAMETER (expmx=87.0)
      WRITE (*,*) 'Hello World'
      RETURN
      END

The problem doesn't seem to be related to whether expmx is explicitly declared as REAL, nor does it seem to depend on the value of the parameter, except for one aspect. It occurs whenever, in the PARAMETER statement

      PARAMETER (x=nn.dddd)

dddd is nonzero.

Please could someone who is not seeing this octave problem test whether this program compiles correctly on their system.

comment:17 Changed 7 years ago by urilabob@…

One other point, I'm guessing this should be reported upstream... unfortunately I'm not clear where upstream is (since replacing gcc with clang/dragonegg doesn't seem to fix the problem, I'm not sure where it's coming from; it doesn't seem to be present in gfortran on fedora). Any gurus listening?

comment:18 in reply to:  15 ; Changed 7 years ago by kurtjaeke@…

Replying to urilabob@…:

I tried the uninstall/reinstall of gmp, as suggested at #40439; it didn't help...

Did you reinstall gmp from source, i.e.,

port uninstall -f gmp
port install -s gmp

with -s for the installation? #40439 was related to parsing floats in gmp, according to my investigation; and this is where this bug happens, according to your investigation in comment:16.

Also, this bug happening with several different compilers points to a shared library, not the compilers themselves. Furthermore, your test programs work fine for me, using

gfortran-mp-4.8 -c -o test.o test.f

comment:19 in reply to:  18 Changed 7 years ago by someuser12

Thanks a lot for finding the origin of the problem! After:

Replying to kurtjaeke@…:

port uninstall -f gmp
port install -s gmp

the upgrade with

port install octave +atlas+gcc48

went fine for me under Mac OS 10.6.8.

comment:20 Changed 7 years ago by urilabob@…

I'm sorry kurtjaeke, you are completely right - I had missed the 'source compilation'. It is now working fine for me as well. Thank you for your help.

comment:21 in reply to:  18 Changed 7 years ago by grg.dll@…

Replying to kurtjaeke@…:

Replying to urilabob@…:

I tried the uninstall/reinstall of gmp, as suggested at #40439; it didn't help...

Did you reinstall gmp from source, i.e.,

port uninstall -f gmp
port install -s gmp

with -s for the installation? #40439 was related to parsing floats in gmp, according to my investigation; and this is where this bug happens, according to your investigation in comment:16.

Also, this bug happening with several different compilers points to a shared library, not the compilers themselves. Furthermore, your test programs work fine for me, using

gfortran-mp-4.8 -c -o test.o test.f

Hi there I have the same problem in this ticket, but the recommended

port uninstall -f gmp
port install -s gmp

does not work for me (Mac OS 10.6.8). Any clue? thanks for any help you may provide

Changed 7 years ago by grg.dll@…

Attachment: main.6.log added

here is the log file

comment:22 Changed 7 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

Please do:

sudo port clean octave
sudo port selfupdate

and then try installing octave again. Should be fixed with r114034.

comment:23 in reply to:  22 Changed 7 years ago by grg.dll@…

Replying to michaelld@…:

Please do:

sudo port clean octave
sudo port selfupdate

and then try installing octave again. Should be fixed with r114034.


Hi michaelld, thanks a lot for your response:

After successfully running:

sudo port clean octave
sudo port selfupdate

I issued:

sudo port install octave +atlas+gcc48

which unfortunately failed.

Note that I am using OSX 10.6.8

Last edited 7 years ago by grg.dll@… (previous) (diff)

Changed 7 years ago by grg.dll@…

Attachment: main.7.log added

and this is the log

comment:24 Changed 7 years ago by grg.dll@…

Resolution: fixed
Status: closedreopened

comment:25 Changed 7 years ago by grg.dll@…

see last comment above

comment:26 Changed 7 years ago by kurtjaeke@…

Cc: kurtjaeke@… added

Cc Me!

comment:27 Changed 7 years ago by kurtjaeke@…

Please proceed as in #41555 comment 6 and following (comment 9, most importantly), and post the results.

comment:28 in reply to:  27 ; Changed 7 years ago by grg.dll@…

Replying to kurtjaeke@…:

Please proceed as in #41555 comment 6 and following (comment 9, most importantly), and post the results.

Thanks a lot for your suggestion, but I am having problems following it. I do not have lldb installed and I am having a hard time figuring out how to properly install it. Again, my OSX is 10.6.8 and my Xcode version is 3.2.6 Any help will be greatly appreciated. Thanks in advance.

comment:29 in reply to:  28 ; Changed 7 years ago by kurtjaeke@…

Replying to grg.dll@…:

I do not have lldb installed and I am having a hard time figuring out how to properly install it.

Is gdb installed? Replace

lldb -- 

with

gdb --args 

and keep the remaining line as given in #41555.

Changed 7 years ago by grg.dll@…

Attachment: gdb_result.txt added

comment:30 in reply to:  29 Changed 7 years ago by grg.dll@…

Replying to kurtjaeke@…:

Replying to grg.dll@…:

I do not have lldb installed and I am having a hard time figuring out how to properly install it.

Is gdb installed? Replace

lldb -- 

with

gdb --args 

and keep the remaining line as given in #41555.

Ok, I've tried following the instructions given in #41555, but I had to modify some commands to adapt them to my system. See attached (later). I think something has not worked...

comment:31 Changed 7 years ago by kurtjaeke@…

Any news?

comment:32 Changed 7 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:33 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: changed from macports-tickets@… to mcalhoun@…
Status: reopenednew

Octave has undergone significant changes recently (r148698).
Any chance this issue has been resolved?

comment:34 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: newclosed

With no further updates, let us assume this is now fixed.
If not, we can open a ticket specifically for octave 4.

Note: See TracTickets for help on using tickets.