Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: seandepagnier on March 16, 2020, 11:06:39 AM
-
I noticed gcc has fortran (and many other languages) enabled but I cannot find "gfortran" and scipy fails to find fortran compiler while building.
What is the best way to get fortran (or scipy) on pi core?
-
If a gfortran extension doesn’t exist, you’ll need to compile it with gcc.
-
Could you point me to the build scripts for gcc? I'm on picore 9, I can only find scripts for picore 4.
-
If you enter "gcc -v", it should tell you how it was configured - then it's just a matter of adding fortran to --enable-languages=
-
Hi seandepagnier
Are these of any help:
http://tinycorelinux.net/7.x/x86/tcz/src/gfortran/
http://tinycorelinux.net/10.x/x86/tcz/src/gfortran/
-
I will build gcc from source now, but I am interested to see the build script for gcc.tcz.
@rich
I looked at the x86 version but it does not create a tcz. What am I missing?
gcc -v shows: "--enable-languages=c,c++,fortran,go" for pi-core but obviously no fortran. Was it split into a separate package?
-
Hi seandepagnier
... I looked at the x86 version but it does not create a tcz. What am I missing? ...
Creating a .tcz involves packaging the created files using mksquashfs. The first thing you should read is:
http://wiki.tinycorelinux.net/wiki:creating_extensions
-
Thank you, I know how squashfs is used, but I would like to see the script used to build gcc.tcz so it can be easily reproduced and I can see how fortran was carved out so I could make a package for just the missing fortran part.
I did compile gcc with gfortran but "make install" to ram runs out of disk space.
-
Hi seandepagnier
... I did compile gcc with gfortran but "make install" to ram runs out of disk space.
Then try pointing it to some persistent storage.Maybe something like:
mkdir /mnt/sda1/package
make DESTDIR=/mnt/sda1/package install
-
You can look at the following to see what needs packaging:
http://www.tinycorelinux.net/10.x/x86/tcz/gfortran.tcz.list
http://www.tinycorelinux.net/10.x/x86/tcz/gfortran-lib.tcz.list
-
Hi seandepagnier
... I did compile gcc with gfortran but "make install" to ram runs out of disk space.
Then try pointing it to some persistent storage.Maybe something like:
mkdir /mnt/sda1/package
make DESTDIR=/mnt/sda1/package install
I did this and unfortunately it lead to more errors because the c++ library is not found with the new compiler. I think more hints to include directories are needed somehow. Unfortunately scipy uses both c++ and fortran.
After changing PATH back and forth after each failure after a few times I got scipy to build but on loading it fails with unresolved externals.
I am trying again with a different gcc version and hopefully it will work. It's difficult to build on tinycore because of the limited ram... is there a way to have a larger ramdisk by adding more swap? I already need to add a lot of swap to make this build but it's not giving me more space in /
-
Hi seandepagnier
... It's difficult to build on tinycore because of the limited ram... is there a way to have a larger ramdisk by adding more swap? I already need to add a lot of swap to make this build but it's not giving me more space in /
I should have also suggested you download and build the source in persistent storage. That should leave a lot more RAM available
for the build.
-
I am trying again with a different gcc version and hopefully it will work.
I think that, in order to avoid strange problems, you would need to compile gfortran with the same version of gcc in use with piCore.