Re: How to troubleshoot build flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Shaw wrote:
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crt1.o: In
function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
rmbadname1: Replacing "len" with "len_bn".
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crt1.o: In
function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -Wl,-z,relro -Wl,-z,relro
/tmp/tmpom3x2m/tmp/tmpom3x2m/src.linux-x86_64-3.3/wmodule.o
/tmp/tmpom3x2m/tmp/tmpom3x2m/src.linux-x86_64-3.3/fortranobject.o
/tmp/tmpom3x2m/wspr1.o /tmp/tmpom3x2m/getfile.o
/tmp/tmpom3x2m/paterminate.o /tmp/tmpom3x2m/audiodev.o
/tmp/tmpom3x2m/tmp/tmpom3x2m/src.linux-x86_64-3.3/w-f2pywrappers.o
thnix.o libwspr.a -L/usr/lib64 -lfftw3f -lgfortran -lportaudio -lpthread
-lsamplerate -lpython3.3m -lgfortran -o ./w.cpython-33m.so
<http://w.cpython-33m.so>" failed with exit status 1
make: *** [WsprMod/w.so] Error 1

It's using the gfortran to link and then explicitly adding -lgfortran (twice, of course); gfortran will do this automatically. Also, if a executable has a main method in C, then you'll be more successful linking the program with gcc instead of gfortran (if it has a main program in fortran, then use gfortran to link). It might be possible to go the other way, but I have never had success.

--
Andrew Schultz
ajs42@xxxxxxxxxxx
http://www.cbe.buffalo.edu/schultz
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux