Package Details: f2c 20200916-2

Git Clone URL: https://aur.archlinux.org/f2c.git (read-only, click to copy)
Package Base: f2c
Description: Fortran to C code translator
Upstream URL: https://www.netlib.org/f2c
Keywords: transpiler
Licenses: custom
Submitter: None
Maintainer: a.kudelin
Last Packager: a.kudelin
Votes: 63
Popularity: 0.24
First Submitted: 2009-10-11 19:13 (UTC)
Last Updated: 2020-12-06 21:00 (UTC)

Latest Comments

a.kudelin commented on 2021-02-12 08:04 (UTC)

@miksolo, please try again using VPN or proxy. It seems you don't have connection to the netlib's server.

miksolo commented on 2021-02-11 17:18 (UTC) (edited on 2021-02-11 17:20 (UTC) by miksolo)

I have trouble downloading f2c-20200916.tar.gz from direct link or using wget. Also that holds installation via yay or pamac.

0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0curl: (6) Could not resolve host: www.netlib.org

==> ERROR: Failure while downloading https://www.netlib.org/f2c/src.tgz Aborting...

xiretza commented on 2020-09-29 16:26 (UTC)

Could you rename the source to something that contains both $pkgname and $pkgver (in accordance with the fourth point in https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_sources)? Something like:

source=("$pkgname-$pkgver.tar.gz::$url/src.tgz"
        "libf2c-$pkgver.zip::$url/libf2c.zip")

Anything else will just cause even more checksum troubles.

jgus commented on 2020-09-27 19:49 (UTC)

I'm also seeing a sha265 mismatch. Clearing the cache doesn't help. Looks like the package needs to be updated to match the modified source?

timmyl17 commented on 2020-09-24 16:51 (UTC)

I'm getting a sha256 mismatch on src.tgz. When I download directly from the website and run

sha256sum src.tgz

I get d4847456aa91c74e5e61e2097780ca6ac3b20869fae8864bfa8dcc66f6721d35

a.kudelin commented on 2020-07-22 20:26 (UTC)

Developers don't distinguish between versions, so you have to remove old files before running makepkg.

snostorm commented on 2020-07-22 10:34 (UTC)

Just FYI I was getting this Error but manual download of src.tgz worked???

~/Development/Arch-SRCpackages/f2c]makepkg -si ==> Making package: f2c 20200425-2 (Wed 22 Jul 2020 11:25:44 AM BST) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Found src.tgz -> Found libf2c.zip ==> Validating source files with sha256sums... src.tgz ... FAILED libf2c.zip ... Passed

bartus commented on 2020-05-26 19:41 (UTC)

Add manual page for f2c

git am < <(curl -s http://ix.io/2nr2)

DasMoeh commented on 2019-12-23 16:09 (UTC)

Thank you! I'll try that.

a.kudelin commented on 2019-12-22 15:15 (UTC) (edited on 2019-12-22 15:33 (UTC) by a.kudelin)

The best solution I found is to create a dummy .c file, call it test.c, for example.

$ cat test.c
#include "f2c.h"

int MAIN__(void) { return 0; }

Linking it along with your main.cpp gives the desired result:

$ ld -o program main.o test.o -llevmar

Another solution is to remove all MAIN__ instances from main.c file of libf2c, adding following line to prepare() section of PKGBUILD: sed -i "/MAIN__/d" libf2c/main.c, but I actually don't know if such a dirty hack can break something...

DasMoeh commented on 2019-12-22 03:10 (UTC) (edited on 2019-12-22 03:11 (UTC) by DasMoeh)

My code is not (yet) open source but maybe this small example will help:

$cat main.cpp

int main ( int argc, char *argv[] ) { return(0); }

$g++ main.cpp -llevmar

/usr/bin/ld: /usr/lib/libf2c.so: undefined reference to `MAIN__'

$ g++ main.cpp -llapack

$

What am i missing?

a.kudelin commented on 2019-12-21 15:41 (UTC) (edited on 2019-12-22 15:19 (UTC) by a.kudelin)

Could you give a link if we're talking about some sort of open source project? In the case of your own code, consider addition of int main(), it's mandatory for C/C++.
UPD. The above statement is wrong, because libf2c requires MAIN__ function, not main.

DasMoeh commented on 2019-12-20 20:27 (UTC)

My code links against levmar (https://aur.archlinux.org/packages/levmar/) which has f2c as dependency.

a.kudelin commented on 2019-12-20 19:58 (UTC)

Your code lacks the entry point, you must define main function to link the program successfully. Please, give me more details to look into.

DasMoeh commented on 2019-12-20 16:03 (UTC)

Since last update:

usr/bin/ld: /usr/lib/libf2c.so: undefined reference to `MAIN__'

Any suggestions?

a.kudelin commented on 2019-12-19 10:26 (UTC)

Fixed.

bartus commented on 2019-12-19 08:14 (UTC)

'unzip' missing form makedepends

$ makechrootpkg
==> Starting prepare()...
/startdir/PKGBUILD: line 25: unzip: command not found
==> ERROR: A failure occurred in prepare().
    Aborting...
==> ERROR: Build failed, check /tmp/f2c/bartus/build

xiretza commented on 2019-11-08 13:06 (UTC)

@fernando_morais: this whole software is too much of a mess for me to maintain, nevermind patch, so I'm disowning the package. If you happen to have a fix for your problem, feel free to adopt it.

fernando_morais commented on 2019-11-08 03:36 (UTC) (edited on 2019-11-08 03:39 (UTC) by fernando_morais)

@xiretza: libf2c.so.2 remains missing even after installation. Can this be fixed?

xiretza commented on 2018-08-07 16:43 (UTC)

@valiska: could you provide me with a patchfile?

valiska commented on 2018-08-07 03:37 (UTC)

In f2c/src/f2c/lib backspace.c did not compile (not in Makefile) hence f_back() was absent in the f2c.so. After adding to Makefile and rebuilding was ok.

xiretza commented on 2018-02-27 07:32 (UTC) (edited on 2018-02-27 07:33 (UTC) by xiretza)

@jgwak: automake is part of base-devel and thus shouldn't be specified in makedepends: https://wiki.archlinux.org/index.php/PKGBUILD#makedepends

jgwak commented on 2018-02-27 04:52 (UTC)

Please add automake as dependency. Thank you.

bartus commented on 2017-03-15 09:16 (UTC) (edited on 2017-03-15 09:16 (UTC) by bartus)

@xyproto : Can you add 'git' as makedepends, without it 'chroot build' fails, complaining of missing dependencies.

xyproto commented on 2014-12-06 17:56 (UTC)

Converted to a git package (using a specific commit, another package called f2c-git could point to the latest commit at any given time). Thanks for the suggestion, tamjan.

tamjan commented on 2014-12-06 10:14 (UTC)

replace#global#3264885bdd7dfdc8365506bcbbd3da6dd4130a3859cab5a46b6f23dea25ba033#1d8dacd74fbc213ee3da04e250c34b0ce9852455f69ca4c49c10986477e70272 This ought be converted to a -git package, perhaps.

xyproto commented on 2014-11-17 15:04 (UTC)

Adopted and updated package.

apinhal commented on 2014-10-23 15:25 (UTC)

Validating source files with sha256sums... f2c.tar.gz ... FAILED

trivix commented on 2014-10-13 10:36 (UTC)

does not build

xantares commented on 2014-10-03 12:18 (UTC)

does not build, url moved.

12qu commented on 2014-09-23 04:59 (UTC)

I second the suggestion given by antony below: "Please symlink libf2c.so -> libf2c.so.2 in order to allow "gcc -lf2c ...", thanks." For example, adding ln -sf libf2c.so.2 "${pkgdir}/usr/lib/libf2c.so" in package() would do it.

anntzer commented on 2014-06-18 21:40 (UTC)

Replace rm by rm -f to solve this issue.

Alister.Hood commented on 2014-06-18 01:50 (UTC)

Oh, that PKGBUILD fails if xsum doesn't exist: ==> Starting prepare()... rm: cannot remove ‘f2c/src/xsum’: No such file or directory

anntzer commented on 2014-05-22 17:09 (UTC)

Why not? $ patch -p1 <libf2c-20110801-main.patch works fine for me, just add it to prepare().

Alister.Hood commented on 2014-05-22 10:57 (UTC)

To clarify: I did still needed to patch the latest source to build geoda, I just thought it wasn't possible to patch the source the current PKGBUILD was using.

Alister.Hood commented on 2014-05-22 10:43 (UTC)

Oh, sorry, I was confusing the source for just libf2c with libf2c + f2c. Is there any chance we could use the Gentoo patch I mentioned? http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/libf2c/files/libf2c-20110801-main.patch?revision=1.2&view=markup

anntzer commented on 2014-05-18 04:47 (UTC)

Here is a PKGBUILD using the upstream sources: http://pastebin.com/KVySC7Uk

anntzer commented on 2014-05-16 07:19 (UTC)

Please symlink libf2c.so -> libf2c.so.2 in order to allow "gcc -lf2c ...", thanks.

Alister.Hood commented on 2014-05-14 23:23 (UTC)

Isn't it just the zip file that you see there?: http://www.netlib.org/f2c/libf2c.zip It was last updated in September, which is a couple of years more recent than the one this package is currently using. I built it and was able to build geoda against it.

Jesin commented on 2014-05-14 19:47 (UTC)

I could not find an archive containing all of the source files on the official website, so I just kept the source URL left by the previous maintainer, assuming it was accurate. Unfortunately I do not have time to fix this right away; I will see what I can do as soon as I have time. If you know of a reliable source for a more up-to-date source archive, please let me know and I will put it in the package immediately.

Alister.Hood commented on 2014-05-05 12:17 (UTC)

Hmmm. When trying to compile things against this I get an error: /usr/lib/libf2c.so.2: undefined reference to `MAIN__' There are patches available (e.g. from Gentoo) for the f2c found at the "upstream" page. But this f2c seems to be different! Is there an upstream url which actually corresponds to this f2c? Why is this f2c being used instead of the one from the upstream url?

xyproto commented on 2013-09-11 11:57 (UTC)

Compiling the output from f2c with gcc instead of tcc did indeed resolve the issue, thanks.

Jesin commented on 2013-09-11 00:02 (UTC)

xyproto: I just installed and ran quine-relay-git. The F77 -> F90 step segfaults under the default setup, but if I use gcc or clang instead of tcc for that step, it succeeds and completes the relay successfully, including the diff step at the end. Do you get any errors when using another C compiler such as gcc or clang?

Jesin commented on 2013-09-09 00:47 (UTC)

I'm a little busy right now; sorry for the delay. I'll take a look at it tomorrow.

xyproto commented on 2013-09-06 14:17 (UTC)

The quine-relay-git package no longer works with this package here (for the same git revision that previously worked). See: https://github.com/mame/quine-relay/issues/35 Does f2c work together with quine-relay-git for you?

Jesin commented on 2013-08-11 20:38 (UTC)

I'm not going to bother upstream about the lack of a unified Makefile. I might submit a report regarding the use of "long" vs "int32_t", since at least gfortran appears to use 32 bits for Fortran INTEGER variables, and platforms with 64-bit longs are so common now.

xyproto commented on 2013-08-09 11:20 (UTC)

There should be a single makefile (one in the top level directory, that calls the makefiles in the subdirectories) for building f2c, please submit a bug report and/or patch to dmg@acm.org. The email address was found at the bottom of this file: http://www.netlib.org/f2c/README I'll ping you on IRC a few extra times too, just to be sure you got the message, just like you did. ;)

xyproto commented on 2013-08-09 09:58 (UTC)

The new webpage for f2c seems to be here: http://www.netlib.org/f2c/index.html Please update the package.

xyproto commented on 2013-08-09 09:56 (UTC)

makedepends=('gcc') should be removed, as gcc is in base-devel and every AUR user is expected to install base-devel first. Please remove it. See also: https://wiki.archlinux.org/index.php/PKGBUILD#makedepends

xyproto commented on 2013-08-09 09:52 (UTC)

About the quoting, the main thing is that the package compiles. Some prefer "${X}", some prefer $x. The consensus for Arch Linux seems to be that as long as variables that may have strings with spaces work correctly, and the package builds, it's fine. It's a controversial topic that TUs and Devs can't seem to agree on and have little reason to try to force a consensus. Thanks for adopting, good luck with maintaining it further.

xyproto commented on 2013-08-08 21:06 (UTC)

Disowned the package so you can adopt it, if you want. I suspect that you care more about this package than I do. :)

Jesin commented on 2013-08-08 17:47 (UTC)

This fixes all the issues I just mentioned, and doesn't even break anything else: http://ix.io/78v

Jesin commented on 2013-08-08 17:18 (UTC)

I also noticed a license file that should be included with the software. I'm putting together a PKGBUILD based on your latest version that corrects all these issues, and will post it soon.

Jesin commented on 2013-08-08 17:10 (UTC)

There's also a typo on line 19, where you use "+=" instead of "=".

Jesin commented on 2013-08-08 16:00 (UTC)

I'm pretty sure you shouldn't put quotes around $CPPFLAGS $CFLAGS and $LDFLAGS . If you quote them, they'll just get treated as one argument, which isn't the desired behavior. (Also, you install /usr/lib/libf2c.so.2 with 644 permissions. It appears conventional to install shared libraries ( /usr/lib/lib*.so* ) with 755 permissions, though I'm not sure whether this is necessary.) Glad I could help.

xyproto commented on 2013-08-08 10:05 (UTC)

Updated the PKGBUILD, thanks Jesin.

Jesin commented on 2013-08-08 02:07 (UTC)

I noticed your PKGBUILD ignores the compilation and linking options from /etc/makepkg.conf while building the shared library. It also installs libf2c.so.2 without execute permissions the wrong permissions, and neglects to install the man page, which is in fact included in the source. Here's a modified version of the PKGBUILD that fixes these issues: http://ix.io/77S Thanks for maintaining this.

xyproto commented on 2013-07-18 14:44 (UTC)

Adopted f2c and updated the PKGBUILD.

commented on 2013-07-17 08:37 (UTC)

Please use another source or change https to http. curl: (60) SSL certificate problem: unable to get local issuer certificate

Red54 commented on 2013-06-01 09:54 (UTC)

[root@Red54 f2c]# namcap f2c-1.0-3-i686.pkg.tar f2c E: Dependency glibc detected and not included (libraries ['usr/lib/libc.so.6'] needed in files ['usr/lib/libf2c.so.2', 'usr/bin/f2c']) [root@Red54 f2c]#

commented on 2012-03-31 01:41 (UTC)

Hi, I have a problem with this package, I found the declaration in f2c.h is not compatible with my archlinux_64. for example: in f2c.h, it has "typedef long int integer", which is twice the real length of integer in my gcc(x86_64).

commented on 2010-11-19 19:26 (UTC)

Thank you very much for finding the license. I'll upload the changes soon, for the moment I haven't my laptop handy!