Package Details: f2c 20200425-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: http://www.netlib.org/f2c
Keywords: transpiler
Licenses: custom
Submitter: None
Maintainer: a.kudelin
Last Packager: a.kudelin
Votes: 57
Popularity: 1.38
First Submitted: 2009-10-11 19:13
Last Updated: 2020-05-30 16:52

Latest Comments

1 2 3 4 5 6 ... Next › Last »

bartus commented on 2020-05-26 19:41

Add manual page for f2c

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

DasMoeh commented on 2019-12-23 16:09

Thank you! I'll try that.

a.kudelin commented on 2019-12-22 15:15

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

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

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

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

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

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

Fixed.

bartus commented on 2019-12-19 08:14

'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