Tiny Core Base > Raspberry Pi
troubleshooting compilation of gfortran
xenodius:
--- Quote from: snecker on December 22, 2020, 04:24:43 AM ---I would add that you shouldn't do any of this as root.
--- End quote ---
I had to use root I think because of my permissions on /mnt/... worked without it in /tmp/, just ran out of space that way. I tried the 10.2 branch this morning, was excited when it ran fine for >15 minutes... but I just got back 11 hours later and it appears to be looping the exact same lines every 7-8 seconds... Pi is still working based on temp. I expected a few hours, but now wondering if it might go forever. :o
To bmarkus, Juanito, and Rich,
I should have been clearer on those details, sorry-- I think I have all that loaded. Relevant onboot packages:
--- Code: ---piCore 11.0beta2, kernel 4.19.81-v7L on Pi4B
gcc, gcc_base-dev, gcc_libs, gcc_libs-dev: 9.2.0
compiletc 9.0
mpc, mpc-dev 1.1.0
mpfr, mpfr-dev 3.1.4
make 4.2.1
cmake 3.15.5
autoconf 2.69
automake 1.16.2
python3.8
--- End code ---
Rich:
Hi xenodius
Looking at this:
http://tinycorelinux.net/6.x/armv6/tcz/gcc.tcz.list
I see this:
--- Code: ---usr/local/bin/cpp
usr/local/bin/armv6l-unknown-linux-gnueabihf-gfortran
usr/local/bin/armv6l-unknown-linux-gnueabihf-gcc-ar
usr/local/bin/gcc
usr/local/bin/gcc-nm
usr/local/bin/armv6l-unknown-linux-gnueabihf-gcc-4.9.2
usr/local/bin/armv6l-unknown-linux-gnueabihf-gcc-ranlib
usr/local/bin/armv6l-unknown-linux-gnueabihf-g++
usr/local/bin/armv6l-unknown-linux-gnueabihf-gcc-nm
usr/local/bin/armv6l-unknown-linux-gnueabihf-gcc
usr/local/bin/gcc-ar
usr/local/bin/gcc-ranlib
usr/local/bin/c++
usr/local/bin/armv6l-unknown-linux-gnueabihf-c++
usr/local/bin/g++
--- End code ---
For every long version of a command there is a short version, except except gfortran.
--- Quote from: xenodius on December 22, 2020, 12:32:17 AM ---Hello, I see gcc.tcz contains gfortran however, when trying to compile scipy it is not recognized. ...
--- End quote ---
If you do this:
--- Code: ---sudo cp -a /tmp/tcloop/gcc/usr/local/bin/armv6l-unknown-linux-gnueabihf-gfortran /usr/local/bin/gfortran
--- End code ---
Does it work then?
xenodius:
Hey Rich, a short version sounds great but I'd be happy with anything that works. Once I setup all these dependencies and backup the image I should be good more or less indefinitely. I tried copying just one and both of:
--- Code: ---usr/local/bin/armv7l-unknown-linux-gnueabihf-gfortran
usr/local/bin/gfortran
--- End code ---
to /usr/loca/bin/gfortran, from 7.x armv7 repo (I am on 11x but 7x was the latest repo I found containing these fortran files). To compile scipy I need BLAS then LAPACK, which themselves need GFortran, each time I tried to compile OpenBLAS-0.3.13 I got:
--- Code: ---gfortran: error trying to exec 'f951': execvp: No such file or directory
gfortran: error trying to exec 'make[2]: *** [<builtin>: sgbbrd.o] Error 1
make[2]: *** Waiting for unfinished jobs....
f951': execvp: No such file or directory
make[2]: *** [<builtin>: spotrf2.o] Error 1
gfortrangfortran: error trying to exec 'f951': execvp: No such file or directory
: error trying to exec 'f951': execvp: No such file or directory
make[2]: *** [<builtin>: sgetrf2.o] Error 1
make[2]: *** [<builtin>: sgbcon.o] Error 1
make[2]: Leaving directory '/mnt/mmcblk0p2/build/blas/OpenBLAS-0.3.13/lapack-netlib/SRC'
make[1]: *** [Makefile:27: lapacklib] Error 2
make[1]: Leaving directory '/mnt/mmcblk0p2/build/blas/OpenBLAS-0.3.13/lapack-netlib'
make: *** [Makefile:244: netlib] Error 2
--- End code ---
Googling found some cases on MAC OSx with this error, that was fixed by linking f951 in the PATH to the binary of gfortran or reinstalling gcc/gfortran, but I have not been able to find out how to do this in piCore. Googling about linux generally I see that there are lots of types of links (hard, soft, symbolic?) and I'm not sure which is needed here. This is new territory for me but I didn't expect this much trouble since gcc has already been compiled for every version of piCore.
Rich:
Hi xenodius
--- Quote from: xenodius on December 25, 2020, 04:09:54 PM --- ... to /usr/loca/bin/gfortran, from 7.x armv7 repo (I am on 11x but 7x was the latest repo I found containing these fortran files). ...
--- End quote ---
You can't copy binaries from one version of gcc to another.
When you said:
--- Quote from: xenodius on December 22, 2020, 12:32:17 AM ---Hello, I see gcc.tcz contains gfortran however, when trying to compile scipy it is not recognized. ...
--- End quote ---
I thought you meant it contained something like:
--- Code: ---usr/local/bin/armv6l-unknown-linux-gnueabihf-gfortran
--- End code ---
but was missing:
--- Code: ---usr/local/bin/gfortran
--- End code ---
which is just a renamed copy (or maybe a hardlink).
xenodius:
Here I was thinking the longshot was 11x vs. 7x piCore, but it makes sense that'd be a sure break.
I suggested gcc.tcz contains gfortran because with the 11x gcc.tcz,
--- Code: ---gcc -v
--- End code ---
returns the configuration,
--- Code: ---./gcc-9.2.0/configure --libdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-clocale=gnu --enable-languages=c,c++,fortran,go --disable-multilib --disable-libstdcxx-pch --enable-cloog-backend=isl --with-isl=/usr --with-system-zlib --enable-frame-pointer --disable-bootstrap --enable-lto --with-pkgversion=piCore --with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-gxx-include-dir=/usr/include/c++/9.2.0
--- End code ---
indicating it was compiled for c, c++, fortran, and go. I'm not sure why I can't compile source that requires fortran, but the only file with 'fortran' in the name of the gcc lib is an include:
--- Code: ---usr/lib/gcc/armv7l-unknown-linux-gnueabihf/9.2.0/include/ISO_Fortran_binding.h
--- End code ---
In the meantime I will see if maybe environmental variables or some configure flags will allow me to build fortran.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version