π
<-
Chat plein-écran
[^]

Can´t compile KhiCas| gmp.h missing?

C, C++, ASM...

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude SuperXX » 16 Juin 2021, 17:23

parisse a écrit:Did you unarchive the file?

Yes I had. I've extracted it and copied the ndless-sdk folder that was inside the archive on my ndless-sdk. I've checked and the additional files at the toolchain folder were there.

Here are some screenshots from the directories, so you can confirm if everything is all right:
Image
Image
Image
Image
Image
Avatar de l’utilisateur
SuperXX
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Prochain niv.: 43.8%
 
Messages: 66
Inscription: 15 Mai 2021, 10:25
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude parisse » 17 Juin 2021, 10:58

Maybe, add explicitly the paths in the Makefile.nspire file with -I in CXXFLAGS/CFLAGS (-Iinclude_path) and -L in LDFLAGS (-Llib_path)
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 77.1%
 
Messages: 3497
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude SuperXX » 18 Juin 2021, 14:37

parisse a écrit:Maybe, add explicitly the paths in the Makefile.nspire file with -I in CXXFLAGS/CFLAGS (-Iinclude_path) and -L in LDFLAGS (-Llib_path)


Ok, so I've tried to edit the file to modify the directory specified on the makefile from this:
Code: Tout sélectionner
GCCFLAGS = -g -Os -marm  -I/Users/parisse/Ndless-r2015/ndless-sdk/toolchain/install/include  -fno-strict-aliasing -DHAVE_CONFIG_H -I. -I..   -DIN_GIAC -DTIMEOUT -DNSPIRE_NEWLIB-DKHICAS -DNO_PHYSICAL_CONSTANTS -DSTATIC_BUILTIN_LEXER_FUNCTIONS -DGIAC_BINARY_ARCHIVE -DNO_UNARY_FUNCTION_COMPOSE -DTIMEOUT -DNO_STDEXCEPT -fno exceptions -D_GNU_SOURCE -DCONFIG_VERSION=\"2020-11-08\" -DCONFIG_BIGNUM  $(FLTO)  -DMICROPY_LIB  -DQUICKJS  # -DBF2GMP # -DNSPIRE_LED #-DGIAC_GENERIC_CONSTANTS -ffunction-sections -fdata-sections

LDFLAGS = -g -Wl,--nspireio,--gc-sections -L/Users/parisse/Ndless-r2015/ndless-sdk/toolchain/install/lib $(FLTO) -lmicropy -lmpfi -lmpfr -lgmp  #


To this:
Code: Tout sélectionner
GCCFLAGS = -g -Os -marm  -I/home/anonymous/Ndless/ndless-sdk/toolchain/install/include  -fno-strict-aliasing -DHAVE_CONFIG_H -I. -I..   -DIN_GIAC -DTIMEOUT -DNSPIRE_NEWLIB -DKHICAS -DNO_PHYSICAL_CONSTANTS -DSTATIC_BUILTIN_LEXER_FUNCTIONS -DGIAC_BINARY_ARCHIVE -DNO_UNARY_FUNCTION_COMPOSE -DTIMEOUT -DNO_STDEXCEPT -fno-exceptions -D_GNU_SOURCE -DCONFIG_VERSION=\"2020-11-08\" -DCONFIG_BIGNUM  $(FLTO)  -DMICROPY_LIB  -DQUICKJS  # -DBF2GMP # -DNSPIRE_LED # -DGIAC_GENERIC_CONSTANTS -ffunction-sections -fdata-sections
LDFLAGS = -g -Wl,--nspireio,--gc-sections -L/home/anonymous/Ndless/ndless-sdk/toolchain/install/lib $(FLTO) -lmicropy -lmpfi -lmpfr -lgmp  #


Which has the directories of my user and the Ndless-sdk


But, it still gives me the same error. But I think Iḿ doing this right. Can you check if what's wrong right?

Image
Image

Full Makefile.nspire code:
Code: Tout sélectionner
# arm-none-eabi-gdb -i=mi -ex "target remote localhost:3333" giac.elf
# Makefile for nspire
# for CX II activate --use-lcd-blit true, for CX HW-W do not activate
# ?? try --mthumb-interwork -mthumb
# adjust path to your install and
# make sure you have done
# /bin/cp config.h.nspire config.h
# before compiling with make -f Makefile.nspire
GCC = nspire-gcc
CXX = nspire-g++
LD = nspire-ld
FLTO = # -flto
# FLTO =
# with -DKHICAS check that kdisplay.o kadd.o k_csdk.o are in GIACOBJS
#GCCFLAGS = -g -Os -marm -I/Users/parisse/Ndless/ndless-sdk/toolchain/install/include  -fno-strict-aliasing -DHAVE_CONFIG_H -I. -I..  -DIN_GIAC -DTIMEOUT -DNSPIRE_NEWLIB  -DNO_PHYSICAL_CONSTANTS -DNO_STDEXCEPT -DSTATIC_BUILTIN_LEXER_FUNCTIONS -DGIAC_BINARY_ARCHIVE -DNO_UNARY_FUNCTION_COMPOSE -DTIMEOUT -fno-exceptions # -DGIAC_GENERIC_CONSTANTS -ffunction-sections -fdata-sections
GCCFLAGS = -g -Os -marm  -I/home/anonymous/Ndless/ndless-sdk/toolchain/install/include  -fno-strict-aliasing -DHAVE_CONFIG_H -I. -I..   -DIN_GIAC -DTIMEOUT -DNSPIRE_NEWLIB -DKHICAS -DNO_PHYSICAL_CONSTANTS -DSTATIC_BUILTIN_LEXER_FUNCTIONS -DGIAC_BINARY_ARCHIVE -DNO_UNARY_FUNCTION_COMPOSE -DTIMEOUT -DNO_STDEXCEPT -fno-exceptions -D_GNU_SOURCE -DCONFIG_VERSION=\"2020-11-08\" -DCONFIG_BIGNUM  $(FLTO)  -DMICROPY_LIB  -DQUICKJS  # -DBF2GMP # -DNSPIRE_LED # -DGIAC_GENERIC_CONSTANTS -ffunction-sections -fdata-sections
LDFLAGS = -g -Wl,--nspireio,--gc-sections -L/home/anonymous/Ndless/ndless-sdk/toolchain/install/lib $(FLTO) -lmicropy -lmpfi -lmpfr -lgmp  #
#GCCFLAGS =  -marm -I~/Ndless/ndless-sdk/include -Os -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -DHAVE_CONFIG_H -I. -I..  -DIN_GIAC -DNO_PHYSICAL_CONSTANTS -DHAVE_CONFIG_H -DNO_STDEXCEPT -DSTATIC_BUILTIN_LEXER_FUNCTIONS -DGIAC_BINARY_ARCHIVE -DNO_UNARY_FUNCTION_COMPOSE -DTIMEOUT -DNO_TEMPLATE_MULTGCD -DUSE_GMP_REPLACEMENTS -DNSPIRE_NEWLIB
#LDFLAGS = -Wl,--nspireio,--gc-sections -ltommath
GENZEHN = genzehn

EXE = luagiac.luax.tns

OBJS = sym2poly.o gausspol.o threaded.o maple.o ti89.o mathml.o moyal.o misc.o permu.o desolve.o input_parser.o symbolic.o index.o modpoly.o modfactor.o ezgcd.o derive.o solve.o intg.o intgab.o risch.o lin.o series.o subst.o vecteur.o sparse.o csturm.o tex.o global.o ifactor.o alg_ext.o gauss.o isom.o help.o plot.o plot3d.o rpn.o prog.o pari.o cocoa.o unary.o usual.o identificateur.o gen.o input_lexer.o tinymt32.o first.o quater.o kdisplay.o k_csdk.o kadd.o quickjs.o libregexp.o libunicode.o cutils.o quickjs-libc.o libbf.o qjscalcjs.o caseval.o graphic.o tijs.o qjsgiac.o # sha256.o
# sha256 is already available in micropython (struct SHA256_CTX renamed as CRYAL_SHA256_CTX)
DISTDIR = .
vpath %.tns $(DISTDIR)

all: $(EXE) khicaslua.tns khicas.tns khicas.zip

.cc.o:
   $(CXX) $(GCCFLAGS") -c $<

.c.o:
   $(GCC) $(GCCFLAGS) -c $<

tijs.o: tijs.js
   arm-none-eabi-objcopy --input binary --output arm-none-eabi --binary-architecture arm $< $@

qjscalcjs.o: qjscalcjs.js
   arm-none-eabi-objcopy --input binary --output arm-none-eabi --binary-architecture arm $< $@

luagiac.o: luagiac.c
   $(GCC) -Os -Wall -W -marm -c $<

missing.o: missing.c
   $(GCC) -Os -Wall -W -marm -c $<

luagiac.luax.elf: $(OBJS)  luagiac.o luabridge.o
   $(LD) $^ -o $(DISTDIR)/$@ $(LDFLAGS")

luagiac.luax.tns.zehn: luagiac.luax.elf
   $(GENZEHN) --compress --input $(DISTDIR)/$^ --output $(DISTDIR)/$@ --name "luagiac"  --uses-lcd-blit true # --240x320-support true
#   $(GENZEHN)  --input $(DISTDIR)/$^ --output $(DISTDIR)/$@ --name "luagiac" --uses-lcd-blit true

luagiac.luax.tns: luagiac.luax.tns.zehn
   make-prg $(DISTDIR)/$^ $(DISTDIR)/$@
   genzehn --info --input luagiac.luax.tns 
   /bin/cp luagiac.luax.tns khicas.tns  /shared/ndless/ti/ndless
   echo "Run buildsha ndless/* to update sha256 fingerprint keys"

clean:
   rm -f *.o luagiac.luax.*

khicaslua.tns: khicas.lua
   luna khicas.lua khicaslua.tns
   /bin/cp khicaslua.tns /shared/ndless/ti/ndless

ptt.tns: ptt.o
   nspire-ld -o ptt.elf ptt.o $(LDFLAGS)
   $(GENZEHN) --compress --input ptt.elf --output ptt.tns.zehn --name "giac"  --uses-lcd-blit true #--240x320-support  true
# without compression
#   $(GENZEHN) --input giac.elf --output khicas.tns.zehn --name "giac"  --uses-lcd-blit true
   make-prg ptt.tns.zehn ptt.tns
   genzehn --info --input ptt.tns
   /bin/cp ptt.tns /shared/ndless/ti/ndless

# run make twice, def/undef FIREBIRDEMU in k_csdk.c and copy to khicas.tns/khicasemu.tns
khicas.tns:   $(OBJS) giacnspire.o #missing.o
   nspire-ld -o giac.elf giacnspire.o $(OBJS) $(LDFLAGS)
   $(GENZEHN) --compress --input giac.elf --output khicas.tns.zehn --name "giac"  --uses-lcd-blit true #--240x320-support  true
# without compression
#   $(GENZEHN) --input giac.elf --output khicas.tns.zehn --name "giac"  --uses-lcd-blit true --240x320-support true
   make-prg khicas.tns.zehn khicas.tns
   genzehn --info --input khicas.tns
   /bin/cp khicas.tns /shared/ndless/ti/ndless/khicas.tns
   /bin/cp luagiac.luax.tns khicas.tns  /shared/ndless/ti/ndless
   firebird-send khicas.tns /ndless
   echo "Run buildsha ndless/* to update sha256 fingerprint keys"
# Warning: if the size of khicas.tns is too large, debugging does not work
# the limit should be changed in  Ndless/ndless/src/resources/ndless.h
# recompile (make clean && make) and send ndless to the emulator
# firebird-send calcbin/ndless_installer_4.5.0.tns /ndless
# firebird-send calcbin/ndless_resources.tns /ndless


libgiac.a:   $(OBJS)
   arm-none-eabi-ar rcs libgiac.a $(OBJS)
   arm-none-eabi-ranlib libgiac.a

khicas.zip: luagiac.luax.tns khicas.tns
   zip khicas.zip luagiac.luax.tns khicas.tns khicas.lua
Avatar de l’utilisateur
SuperXX
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Prochain niv.: 43.8%
 
Messages: 66
Inscription: 15 Mai 2021, 10:25
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude parisse » 18 Juin 2021, 15:44

Makefile.nspire is not the default Makefile, you must call
Code: Tout sélectionner
make -f Makefile.nspire
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 77.1%
 
Messages: 3497
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude SuperXX » 18 Juin 2021, 16:42

Nop. The same.

Maybe it's kali fault. Later this day I must try this on Ubuntu and see if it works.

Not even adding the toolchain directories to "PATH" worked

Image
Avatar de l’utilisateur
SuperXX
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Prochain niv.: 43.8%
 
Messages: 66
Inscription: 15 Mai 2021, 10:25
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude Adriweb » 18 Juin 2021, 17:02

It's not your distro's fault. I mean, you're mixing up a lot of things here. Why did you put things inside the ndless-sdk folder? That's for ... the ndless sdk, not external projects. And even more, its src folder. You shouldn't touch those.

So I suggest wiping everything off, following the ndless installation tutorial exactly (including the steps where you have to adjust the PATH after the toolchain installation), then not mix up ndless and external projects.
Also, adding built libs/headers like gmp/mfpr should be done in the install folder of the ndless toolchain, where other libs (.a files) and headers are, already. Your screenshots above show that you've put them in some other places....? Why ?

I've confirmed that all this works fine with a KhiCAS build.
Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80%
 
Messages: 14599
Images: 1216
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude parisse » 18 Juin 2021, 19:58

There is something strange, because make -f Makefile.nspire should not run the simple command nspire-g++ -c sym2poly.cc, it should run a more complex command with all the options, including the -I... option.
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 77.1%
 
Messages: 3497
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas

Message non lude SuperXX » 19 Juin 2021, 11:11

So, after what @Adriweb said, I´ve decided to do what he said and try that on my Ubuntu VM, even thought that yes, doesn´t make sense being the distro´s fault, but still I waited to try it on my Ubuntu VM

And after changing the toolchain directories on the Makefile.nspire, I finally got a new error (It´s an error but finally it´s something different):

Code: Tout sélectionner
gen.h:59:10: fatal error: gmpxx.h: No such file or directory
   59 | #include <gmpxx.h>
      |          ^~~~~~~~~
compilation terminated.
make: *** [Makefile:32: sym2poly.o] Error 1


Now that the file changed, as I can understand it´s now reading the ".../toolchain/install/include" folder. So in that time, I had the idea to download every single file that appeared as missing. But a lot of files later I´ve understand how much time this would cost to me. Isn´t there a more quicker solution then what I´m doing? Or maybe I´m so blind that I don´t find it on the readme files.

I´ve stopped downloading every singles file in this error:
Code: Tout sélectionner
home/ubuntu/Ndless/ndless-sdk/toolchain/install/include/FL/Enumerations.H:44:10: fatal error: FL/abi-version.h: No such file or directory
   44 | #include <FL/abi-version.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile.nspire:32: sym2poly.o] Error 1


Anyways, here is a screenshot, as usual:
Image
Note:It´s appearing just "make" because I changed the file from Makefile.nspire to just Makefile. But in the newest tries I´ve changed it back to normal and I´m doing the same as parisse said later. But as far as I can understand, it doesn´t affect anything

P.S:Oh, one more thing. @parisse, it seems that "https://www-fourier.ujf-grenoble.fr/~parisse/install_en" is down.

And thanks for everything until now.
Avatar de l’utilisateur
SuperXX
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Prochain niv.: 43.8%
 
Messages: 66
Inscription: 15 Mai 2021, 10:25
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude parisse » 19 Juin 2021, 12:49

I think I know why it fails. Try to
Code: Tout sélectionner
cp config.h.nspire config.h
in the src directory.
I guess you have run configure in the top-level source directory of giac, and a config.h file has been generated for the x86 host.
Avatar de l’utilisateur
parisseVIP++
Niveau 12: CP (Calculatrice sur Pattes)
Niveau 12: CP (Calculatrice sur Pattes)
Prochain niv.: 77.1%
 
Messages: 3497
Inscription: 13 Déc 2013, 16:35
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: Can´t compile KhiCas| gmp.h missing?

Message non lude SuperXX » 19 Juin 2021, 13:58

parisse a écrit:I think I know why it fails. Try to
Code: Tout sélectionner
cp config.h.nspire config.h
in the src directory.
I guess you have run configure in the top-level source directory of giac, and a config.h file has been generated for the x86 host.


It worked, no more "No Such File or Directory" errors.

But Now it ends up with this:
Code: Tout sélectionner
arm-none-eabi-ld: cannot find -lmicropy
collect2: error: ld returned 1 exit status
make: *** [Makefile.nspire:50: luagiac.luax.elf] Error 1


Well, I guess errors like me
Avatar de l’utilisateur
SuperXX
Niveau 7: EP (Espèce Protégée: geek)
Niveau 7: EP (Espèce Protégée: geek)
Prochain niv.: 43.8%
 
Messages: 66
Inscription: 15 Mai 2021, 10:25
Genre: Homme
Calculatrice(s):
MyCalcs profile

PrécédenteSuivante

Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 4 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
687 utilisateurs:
>671 invités
>11 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)