CE-Programming / toolchain

Toolchain and libraries for C/C++ programming on the TI-84+ CE calculator series
https://ce-programming.github.io/toolchain/index.html
GNU Lesser General Public License v3.0
528 stars 53 forks source link

Fail to compile from source #502

Closed BrianNormant closed 2 months ago

BrianNormant commented 2 months ago

Hi,

I'm trying to compile from source on nixos, I downloaded and compiled clang for ez80 from the link in the wiki I installed fasmg from the link.

But when I run make I get a failure with this error message:

flat assembler  version g.j27m
libload.asm [24] ../include/library.inc [1] ../include/ez80.inc [1] ../include/commands
.alm [69]:
        err 'unsupported command in once'
Processed: err 'unsupported command in once'
Error: unexpected instruction.

Am I missing something?

myclevorname commented 2 months ago

I already went through this same exact problem before. What you need to do is override fasmg to update it to the latest version. My recommendation is to use my Nix flake, which has the CE C toolchain.

BrianNormant commented 2 months ago

Thanks a lot, I was writing a flake for it and I was about to give up, compiling llvm 10 times in a row is a pain. But using your flake I worked perfectly.

What you need to do is override fasmg to update it to the latest version If I understand correctly the nixpkgs?ref=unstable version of fasmg is out of date? Another question, what is the patchPhase for innix-calculators/pkgs/build-support/ce-toolchain/default.nix

That aside, you solved my problem, I'm closing this.

myclevorname commented 2 months ago

The patchPhase is required to make it work AND have a reproducible output that isn't based on timestamps. I could've used a patch, but I need to learn how to patch using patch files.