Opened 13 years ago

Closed 13 years ago

Last modified 4 years ago

#32804 closed request (fixed)

f2c port request

Reported by: vaccari@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: f2c

Description

Would it be possible to add f2c to the available ports?

http://www.netlib.org/f2c/

Thanks

Attachments (3)

Portfile (1.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
f2c portfile which actually only installs libf2c
patch-makefile.u.diff (425 bytes) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
main.log (8.3 KB) - added by vaccari@… 13 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: f2c removed
Milestone: MacPorts Future
Summary: f2c port unavailable in MacPortsf2c port request
Version: 2.0.3

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

I am looking into it.

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

The only distfile I see there is a zip file for libf2c. I've managed to make a port of this, but it only contains the library; that source does not build the actual f2c program. The source of the program appears to only be available as individual files in http://www.netlib.org/f2c/src/ which is silly. I'm looking to see if freebsd or gentoo or other distributions have already packaged sensible distfiles of that which we could use.

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: Portfile added

f2c portfile which actually only installs libf2c

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: patch-makefile.u.diff added

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned
  • r88769: added f2c port; this is the program you use to convert Fortran to C code
  • r88768: added libf2c port; this is the library you link your code with after you've converted it from Fortran to C

I have not tried them, since I don't know Fortran.

comment:5 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

comment:6 in reply to:  4 Changed 13 years ago by vaccari@…

Replying to ryandesign@…:

  • r88769: added f2c port; this is the program you use to convert Fortran to C code
  • r88768: added libf2c port; this is the library you link your code with after you've converted it from Fortran to C

I have not tried them, since I don't know Fortran.

Just tried on some fortran code. Translation with f2c and compiling/linking with libf2c produced a working executable

Thanks for the quick port!

comment:7 Changed 13 years ago by vaccari@…

Resolution: fixed
Status: closedreopened

While everything was ok installing f2c on a machine running 10.6.8, installation fails here on a machine with 10.7.2, and Xcode 4.2.1. This machine is born with Lion, with MacPorts 2.0.3 freshly installed from scratch. Other packages (gcc45, ghostscript, gmt4, gnuplot and their dependencies) installed with no issues up to now.

The full log with the default compiler is given below. The same failure occurs using llvm-gcc-4.2 or apple-gcc42 (I added just the two error messages at the bottom, but can add the full log if needed):

Last login: Mon Jan 23 09:25:44 on ttys004
im06:~$ cat /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/main.log
version:1
:msg:main --->  Computing dependencies for f2c:info:main .:debug:main Searching for dependency: libf2c
:debug:main Didn't find receipt, going to depspec regex for: libf2c
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/libf2c
:debug:main OS darwin/11.2.0 (Mac OS X 10.7) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/variant_descriptions.conf
:debug:main universal variant already exists, so not adding the default one
:info:main .:debug:main Searching for dependency: unzip
:debug:main Didn't find receipt, going to depspec regex for: unzip
:debug:main Found Dependency: path: /usr/bin filename: unzip regex: ^unzip$
:debug:main Found Dependency: path: /usr/bin filename: unzip regex: ^unzip$
:msg:main 
:msg:main --->  Dependencies to be installed: libf2c
:debug:main Starting logging for libf2c
:debug:main Executing org.macports.main (f2c)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:archivefetch archivefetch phase started at Mon Jan 23 12:09:11 CET 2012
:msg:archivefetch --->  Fetching archive for f2c
:debug:archivefetch Executing org.macports.archivefetch (f2c)
:debug:archivefetch Can't run archivefetch on this port without elevated privileges. Escalating privileges back to root.
:debug:archivefetch euid changed to: 0. egid changed to: 0.
:debug:archivefetch changing euid/egid - current euid: 0 - current egid: 0
:debug:archivefetch egid changed to: 501
:debug:archivefetch euid changed to: 502
:info:archivefetch --->  f2c-20110816_0.darwin_11.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/software/f2c
:msg:archivefetch --->  Attempting to fetch f2c-20110816_0.darwin_11.x86_64.tbz2 from http://packages.macports.org/f2c
:debug:archivefetch Fetching archive failed:: The requested URL returned error: 404
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:fetch fetch phase started at Mon Jan 23 12:09:12 CET 2012
:notice:fetch --->  Fetching f2c
:debug:fetch Can't run fetch on this port without elevated privileges. Escalating privileges back to root.
:debug:fetch euid changed to: 0. egid changed to: 0.
:debug:fetch changing euid/egid - current euid: 0 - current egid: 0
:debug:fetch egid changed to: 501
:debug:fetch euid changed to: 502
:debug:fetch Executing org.macports.fetch (f2c)
:info:fetch --->  f2c-20110816.tar.bz2 doesn't seem to exist in /opt/local/var/macports/distfiles/f2c
:debug:fetch Pinging www.ryandesign.com...
:debug:fetch Pinging distfiles.macports.org...
:debug:fetch Pinging aarnet.au.distfiles.macports.org...
:debug:fetch Pinging her.gr.distfiles.macports.org...
:debug:fetch Pinging jog.id.distfiles.macports.org...
:debug:fetch Pinging lil.fr.distfiles.macports.org...
:debug:fetch Pinging sea.us.distfiles.macports.org...
:debug:fetch Pinging ykf.ca.distfiles.macports.org...
:debug:fetch www.ryandesign.com ping time is 47.926
:debug:fetch distfiles.macports.org ping time is 174.155
:debug:fetch aarnet.au.distfiles.macports.org ping time is 327.998
:debug:fetch her.gr.distfiles.macports.org ping time is 66.828
:debug:fetch jog.id.distfiles.macports.org ping time is 389.034
:debug:fetch lil.fr.distfiles.macports.org ping time is 27.798
:debug:fetch sea.us.distfiles.macports.org ping time is 10000
:debug:fetch ykf.ca.distfiles.macports.org ping time is 131.768
:notice:fetch --->  Attempting to fetch f2c-20110816.tar.bz2 from http://lil.fr.distfiles.macports.org/f2c
:debug:fetch Privilege de-escalation not attempted as not running as root.
:debug:checksum checksum phase started at Mon Jan 23 12:09:15 CET 2012
:notice:checksum --->  Verifying checksum(s) for f2c
:debug:checksum Executing org.macports.checksum (f2c)
:info:checksum --->  Checksumming f2c-20110816.tar.bz2
:debug:checksum Correct (rmd160) checksum for f2c-20110816.tar.bz2
:debug:checksum Correct (sha256) checksum for f2c-20110816.tar.bz2
:debug:checksum Privilege de-escalation not attempted as not running as root.
:debug:extract extract phase started at Mon Jan 23 12:09:15 CET 2012
:notice:extract --->  Extracting f2c
:debug:extract setting option extract.cmd to /usr/bin/bzip2
:debug:extract Executing org.macports.extract (f2c)
:info:extract --->  Extracting f2c-20110816.tar.bz2
:debug:extract setting option extract.args to '/opt/local/var/macports/distfiles/f2c/f2c-20110816.tar.bz2'
:debug:extract Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7'
:debug:extract Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work" && /usr/bin/bzip2 -dc '/opt/local/var/macports/distfiles/f2c/f2c-20110816.tar.bz2' | /usr/bin/gnutar --no-same-owner -xf -'
:debug:extract Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work" && /usr/bin/bzip2 -dc '/opt/local/var/macports/distfiles/f2c/f2c-20110816.tar.bz2' | /usr/bin/gnutar --no-same-owner -xf - 
:debug:extract euid/egid changed to: 0/0
:debug:extract chowned /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work to macports
:debug:extract euid/egid changed to: 502/501
:debug:extract Privilege de-escalation not attempted as not running as root.
:debug:patch patch phase started at Mon Jan 23 12:09:15 CET 2012
:debug:patch Executing org.macports.patch (f2c)
:debug:patch Privilege de-escalation not attempted as not running as root.
:debug:configure configure phase started at Mon Jan 23 12:09:15 CET 2012
:notice:configure --->  Configuring f2c
:debug:configure Using compiler 'Mac OS X clang'
:debug:configure Executing org.macports.configure (f2c)
:debug:configure Privilege de-escalation not attempted as not running as root.
:debug:build build phase started at Mon Jan 23 12:09:15 CET 2012
:notice:build --->  Building f2c
:debug:build Executing org.macports.build (f2c)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.7'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/f2c-20110816" && /usr/bin/make -j8 -w all -f makefile.u CC="/Developer/usr/bin/clang -arch x86_64" CFLAGS="-O2"'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/f2c-20110816" && /usr/bin/make -j8 -w all -f makefile.u CC="/Developer/usr/bin/clang -arch x86_64" CFLAGS="-O2" 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/f2c-20110816'
:info:build /Developer/usr/bin/clang -arch x86_64 -O2 -o xsum xsum.c
:info:build make: *** No rule to make target `README', needed by `xsum.out'.  Stop.
:info:build make: *** Waiting for unfinished jobs....
:info:build xsum.c:234:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
:info:build                 while(s = *++argv);
:info:build                       ~~^~~~~~~~~
:info:build xsum.c:234:11: note: place parentheses around the assignment to silence this warning
:info:build                 while(s = *++argv);
:info:build                         ^
:info:build                       (          )
:info:build xsum.c:234:11: note: use '==' to turn this assignment into an equality comparison
:info:build                 while(s = *++argv);
:info:build                         ^
:info:build                         ==
:info:build 1 warning generated.
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/f2c-20110816'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/f2c-20110816" && /usr/bin/make -j8 -w all -f makefile.u CC="/Developer/usr/bin/clang -arch x86_64" CFLAGS="-O2" " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for f2c): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for f2c is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/main.log
im06:~ 

I tried also

sudo port clean f2c
sudo port install f2c configure.compiler=llvm-gcc-4.2

and in the log the error is again similar

...
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/f2c-20110816" && /usr/bin/make -j8 -w all -f makefile.u CC="/Developer/usr/bin/llvm-gcc-4.2 -arch x86_64" CFLAGS="-O2" " returned error 2

Then tried

sudo port clean f2c
sudo port install apple-gcc42
sudo port install f2c configure.compiler=apple-gcc-4.2 configure.cxx=g++-apple-4.2

obtaining

...
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_f2c/f2c/work/f2c-20110816" && /usr/bin/make -j8 -w all -f makefile.u CC="/opt/local/bin/gcc-apple-4.2 -arch x86_64" CFLAGS="-O2" " returned error 2
...
...
Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

Changed 13 years ago by vaccari@…

Attachment: main.log added

comment:8 Changed 13 years ago by vaccari@…

sorry for there messy look of the log, attached the log file now...

comment:9 Changed 13 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: reopenedclosed

This should really be filed under a new ticket.

Note: See TracTickets for help on using tickets.