janet: Error when executing compiled executable
When I compile an executable with jpm’s declare-executable the resulting binary does not work and only produces:
janet top level signal - "funcdef has invalid bytecode"
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 36 (36 by maintainers)
Thanks for all the help in diagnosing this @bakpakin @sogaiu !
libpath looks wrong to me, I would have expected
/home/tionis/.local/libinstead of/home/tionis/.local/lib/janetI didn’t test it on this machine I think, I also could find any remnants of another janet installation when searching through /usr/include /usr/local/include /usr/lib and friends
I’m guessing the linker is picking up libjanet.a then from somewhere - what does
jpm show-pathsshow for libpath? This is where the static and dynamic libraries will be linked to the executables created by jpm.Perhaps try clearing jpm cache and rebuild all dependencies from scratch, the addition of new instructions would break existing compiled bytecode.
Given the bisected commit, without a repro I would have to guess this is user error - using one version of janet to build and different version of janet to execute somehow.