Opened 7 years ago

Closed 7 years ago

#54108 closed defect (duplicate)

I cannot build g95

Reported by: manulcaux Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: g95

Description (last modified by mf2k (Frank Schima))

In my way to upgrade my mac port installation after migrating my whole environment from one MacBook Pro to a new MacBook Pro Touchbar, i cannot upgrade g95 with the following error. I report here the full error after having cleaned g95, uninstalled it and reinstall it, the error is still the same :

[macp2034:~] caux% sudo port install g95
--->  Computing dependencies for g95
--->  Fetching archive for g95
--->  Attempting to fetch g95-0.93_4.darwin_16.x86_64.tbz2 from https://packages.macports.org/g95
--->  Attempting to fetch g95-0.93_4.darwin_16.x86_64.tbz2 from http://nue.de.packages.macports.org/g95
--->  Attempting to fetch g95-0.93_4.darwin_16.x86_64.tbz2 from http://lil.fr.packages.macports.org/g95
--->  Fetching distfiles for g95
--->  Verifying checksums for g95
--->  Extracting g95
--->  Applying patches to g95
--->  Configuring g95
Warning: reinplace s|tjmp %%edx|tjmp *%%edx| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_g95/g95/work/gcc-4.2.4/gcc/config/i386/i386.c
--->  Building g95
Error: Failed to build g95: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_g95/g95/main.log for details.

I tried to find something in this file, but didn't succeed.

I am running Mac OS Sierra 10.12.4, updated successfully my MacPort installation, and all my softs installed via MacPort I think, having not seen other errors but this one.

Attachments (1)

main.log (45.9 KB) - added by manulcaux 7 years ago.

Download all attachments as: .zip

Change History (11)

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

Owner: set to tenomoto
Port: g95 added
Status: newassigned

In the future, please use WikiFormatting, fill in the Port field and Cc the port maintainers (port info --maintainers g95), if any.

comment:2 Changed 7 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Please attach the main.log file; without it, we cannot know why it failed to build.

Changed 7 years ago by manulcaux

Attachment: main.log added

comment:4 Changed 7 years ago by manulcaux

Hi,

As requested, I attached the relevant file. Please note I just made some tries and still have the error.

comment:5 Changed 7 years ago by JohnPritchard (Johnny P)

Hi, in the hope that the following is useful...

There are two other tickets reporting the same problem, #54109 & #54155.

The problem seems to be simply that two comments at the beginning of the file libf95/math/x87.S which start with "##" are being mis-intrepretted somehow and producing "unexpected token at start of statement" errors.

The two lines are:

## Some of the code here is transliterated from the x87 glibc code ## originally written by J.T. Conklin and Ulrich Drepper.

If one simply encloses these in /* ... */ the problem (appears) to be solved, i.e.

/*

## Some of the code here is transliterated from the x87 glibc code ## originally written by J.T. Conklin and Ulrich Drepper.

*/ I can provide the modified Portfile and the patch file which implements this fix.

Best regards

John Pritchard

comment:6 Changed 7 years ago by JohnPritchard (Johnny P)

Ooops, forgot to "code block" the code bits...

The two lines are:

## Some of the code here is transliterated from the x87 glibc code
## originally written by J.T. Conklin and Ulrich Drepper.

If one simply encloses these in /* ... */ the problem (appears) to be solved, i.e.

/*
## Some of the code here is transliterated from the x87 glibc code
## originally written by J.T. Conklin and Ulrich Drepper.
*/

I can provide the modified Portfile and the patch file which implements this fix.

Cheers

John

comment:7 Changed 7 years ago by manulcaux

Hi John,

Many thanks for the help.

What I understand is that I can make the change on my computer, but it would be more useful to do it at a higher level, and this is what you propose ? Can you confirm please ?

Cheers,

comment:8 Changed 7 years ago by avalenzuelanav

Hi John and Manu,

I reported the ticket #54155 with the same problem, and I solved it just like you said, John. I opened the file x87.S using

sudo vim x87.S

And then enclosed the first and second lines with /* --- */. After the edition was made, I executed

sudo port install g95

And it build it! Thank you very much for your help!

Cheers,

Alvaro

comment:9 Changed 7 years ago by JohnPritchard (Johnny P)

Hi Manu,

Sorry for the delay in replying, I was waiting for email notifications which never came, probably I have to turn something on somewhere.

Anyway. Indeed it seems you can just try to install it. Let it fail. Then edit the relevant file, then retry the installation command ("sudo port install g95") as indicated by Alvaro. I didn't do it like this though, I created my own custom version of the Portfile and a corresponding patch file (just by copying the original g95 Portfile and files directory and making the required modifications) and then installed that Portfile. If you are still looking for the answer you can try this:

cd $HOME
ftp http://www.eso.org/~jpritcha/g95/g95.macports.tgz
tar -zxvf g95.macports.tgz
cd lang/g95/
sudo port install
cd ../..
rm -fr lang/g95
rmdir lang
rm g95.macports.tgz
sudo port install g95

Hope that helps you out.

Cheers John

comment:10 Changed 7 years ago by tenomoto (Takeshi Enomoto)

Resolution: duplicate
Status: assignedclosed

Duplicate of #52990.

Note: See TracTickets for help on using tickets.