Skip to content

jpm build fails when using system SQLite library #22

@smartmic

Description

@smartmic

I wanted to build the version with my system's SQLite library.
As far as I have debugged, the compilation steps do not create the output object files in the build/ directory.
If I run each cc command by hand, I will succeed.
But I have no idea and experiences with jpm why it did not create the intermediate object files.
Other jpm build steps with other packages work fine though.

Here is my issue in detail:

$ jpm --verbose build
cc -c main.c -DUSE_SYSTEM_SQLITE -DJANET_BUILD_TYPE=release  -I/usr/include/janet -I/usr/lib/janet -O2 -fPIC -o build/main.o
generating meta file build/sqlite3.meta.janet...
cc: warning: : linker input file unused because linking not done
cc: error: : linker input file not found: No such file or directory
error: error: command failed with non-zero exit code 1
  in os/execute [src/core/os.c] on line 1362
  in shell [/usr/lib/janet/jpm/shutil.janet] (tailcall) on line 143, column 5
  in <anonymous> [/usr/lib/janet/jpm/rules.janet] on line 20, column 22
error: build fail
  in pdag [/usr/lib/janet/jpm/dagbuild.janet] (tailcall) on line 79, column 23
  in run [/usr/lib/janet/jpm/cli.janet] (tailcall) on line 88, column 9
  in run-main [boot.janet] on line 3951, column 16
  in cli-main [boot.janet] on line 4104, column 17
$ # build/main.o is missing, it was not created!
$ ls build
sqlite3.meta.janet
$ # but running above compilation by hand works just fine:
$ cc -c main.c -DUSE_SYSTEM_SQLITE -DJANET_BUILD_TYPE=release  -I/usr/include/janet -I/usr/lib/janet -O2 -fPIC -o build/main.o
$ ls build
main.o  sqlite3.meta.janet
$ # now I could continue, every `cc` command only outputs its targets when run manually…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions