Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: vincenthure on December 27, 2021, 05:20:23 PM

Title: Installing Octave
Post by: vincenthure on December 27, 2021, 05:20:23 PM
Hello,

I need to install Octave to make calibration on my IMU.
Unfortunately this module is not ready made for pi!
I try to compile it from source, but I need a fortran compiler to do it.
It's going to difficult for me...
As somebody already made a octave.tcz?
Title: Re: Installing Octave
Post by: Juanito on December 28, 2021, 04:57:41 AM
There are notes on how to build gfortran here: http://tinycorelinux.net/12.x/x86_64/tcz/src/gfortran/compile-gfortran.txt

You'd have to used piCore flags rather than those for CorePure64.
Title: Re: Installing Octave
Post by: vincenthure on December 28, 2021, 02:59:27 PM
Thank you for your help
When I see the script I am afraid  :-[
I try to compil but it's going out of memory.
As Tinylinux work in RAM, I think I don't have enough place
Title: Re: Installing Octave
Post by: Juanito on December 28, 2021, 03:58:34 PM
You don’t have to compile it in memory, you can compile it on a usb stick or hard drive.
Title: Re: Installing Octave
Post by: vincenthure on December 31, 2021, 10:35:31 AM
export CFLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"
export CXXFLAGS="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"

I find this flag for Pi zero W, are they ok for Pi zero 2W ?
Isn't it a arm7?
Title: Re: Installing Octave
Post by: polikuo on December 31, 2021, 10:45:57 AM
I don't have a Pi Zero 2W
What's the output of the line below ?
Code: [Select]
uname -m
For armv6, armv7, armv7l
THE_FLAGS='-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp'
For aarch64
THE_FLAGS='-march=armv8-a+crc -mtune=cortex-a72'
Title: Re: Installing Octave
Post by: Rich on December 31, 2021, 10:47:52 AM
Hi vincenthure
Yes, those flags are correct. Everything gets compiled to be ARMv6 compatible.
Title: Re: Installing Octave
Post by: vincenthure on January 05, 2022, 07:09:44 AM
I try many times, but never success to compile gcc with fortran option  >:(
It's a very long process and always stuck, sometime after running 2 or 3 hours
I try to fix it by searching error on google, but I have to many problems ...
Is it a other way to get Octave working on raspberry? something already compiled
Title: Re: Installing Octave
Post by: vincenthure on January 07, 2022, 05:21:27 AM
With the right flags, is it possible to compile gcc on a computer with Debian x86 for the raspberry?
Title: Re: Installing Octave
Post by: Juanito on January 07, 2022, 05:39:40 AM
You might be able to cross-compile, but I think you would be better off compiling natively on an RPi3/4.

There's another reference here: http://tinycorelinux.net/13.x/armv7/tcz/src/gcc/gcc1020.build

..which seems to indicate that a fortran compiler has already been built - you could pm @bmarkus to see if he could post it.
Title: Re: Installing Octave
Post by: bmarkus on January 07, 2022, 07:48:50 AM
I will upload GFORTRAN during the weekend.
Title: Re: Installing Octave
Post by: bmarkus on January 10, 2022, 12:07:11 AM
GFORTRAN added to repo
Title: Re: Installing Octave
Post by: vincenthure on January 10, 2022, 08:26:52 AM
Thank you for your great help  :D
I successfuly import gfortran and libgfortran
I download Octave source
I run configure and get this errors :
Code: [Select]
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... no
checking whether gfortran accepts -g... no
checking whether a usable Fortran compiler was found... yes
checking how to get verbose linking output from gfortran... configure: WARNING: compilation failed

checking for Fortran 77 libraries of gfortran...
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... configure: error: in `/mnt/mmcblk0p2/octave-6.4.0/.build':
configure: error: cannot compile a simple Fortran program

Any Ideas ?
Title: Re: Installing Octave
Post by: Juanito on January 10, 2022, 08:42:09 AM
Did you load the compiletc extension?
Title: Re: Installing Octave
Post by: vincenthure on January 13, 2022, 09:48:42 AM
Yes I do
Getting this octave is a endless work !  :'(
Title: Re: Installing Octave
Post by: Juanito on January 13, 2022, 11:52:07 AM
You could look at config.log to see if it contains useful information about the error?