WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Installing Octave  (Read 2539 times)

Offline vincenthure

  • Newbie
  • *
  • Posts: 16
Installing Octave
« on: December 27, 2021, 02: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?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Installing Octave
« Reply #1 on: December 28, 2021, 01: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.

Offline vincenthure

  • Newbie
  • *
  • Posts: 16
Re: Installing Octave
« Reply #2 on: December 28, 2021, 11:59:27 AM »
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

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Installing Octave
« Reply #3 on: December 28, 2021, 12:58:34 PM »
You don’t have to compile it in memory, you can compile it on a usb stick or hard drive.

Offline vincenthure

  • Newbie
  • *
  • Posts: 16
Re: Installing Octave
« Reply #4 on: December 31, 2021, 07: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?

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: Installing Octave
« Reply #5 on: December 31, 2021, 07: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'

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Installing Octave
« Reply #6 on: December 31, 2021, 07:47:52 AM »
Hi vincenthure
Yes, those flags are correct. Everything gets compiled to be ARMv6 compatible.

Offline vincenthure

  • Newbie
  • *
  • Posts: 16
Re: Installing Octave
« Reply #7 on: January 05, 2022, 04: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

Offline vincenthure

  • Newbie
  • *
  • Posts: 16
Re: Installing Octave
« Reply #8 on: January 07, 2022, 02:21:27 AM »
With the right flags, is it possible to compile gcc on a computer with Debian x86 for the raspberry?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Installing Octave
« Reply #9 on: January 07, 2022, 02: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.
« Last Edit: January 07, 2022, 02:42:47 AM by Juanito »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Installing Octave
« Reply #10 on: January 07, 2022, 04:48:50 AM »
I will upload GFORTRAN during the weekend.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Installing Octave
« Reply #11 on: January 09, 2022, 09:07:11 PM »
GFORTRAN added to repo
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline vincenthure

  • Newbie
  • *
  • Posts: 16
Re: Installing Octave
« Reply #12 on: January 10, 2022, 05: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 ?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Installing Octave
« Reply #13 on: January 10, 2022, 05:42:09 AM »
Did you load the compiletc extension?

Offline vincenthure

  • Newbie
  • *
  • Posts: 16
Re: Installing Octave
« Reply #14 on: January 13, 2022, 06:48:42 AM »
Yes I do
Getting this octave is a endless work !  :'(