-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jpm build fails when using system SQLite library #22
Comments
I'm not familiar with the specifics, but I noticed mention of what seems like this scenario in the README. It wasn't clear to me from the output above whether:
had been performed from the output above. |
Sorry, I forgot to put it in my listing above, but, yes, |
Thanks for the clarification. I also got similar error output. The following diff might work depending on your setup. It worked here. diff --git a/project.janet b/project.janet
index 14185b0..dbabdb7 100644
--- a/project.janet
+++ b/project.janet
@@ -24,8 +24,8 @@
(if use-system-lib
(declare-native
:name "sqlite3"
- :cflags (pkg-config ["sqlite3" "--cflags"]
- {"PKG_CONFIG_ALLOW_SYSTEM_CFLAGS" "1"})
+ :cflags ["-I/usr/include"] #(pkg-config ["sqlite3" "--cflags"]
+ # {"PKG_CONFIG_ALLOW_SYSTEM_CFLAGS" "1"})
:lflags (pkg-config ["sqlite3" "--libs"])
:source @["main.c"]
:defines {"USE_SYSTEM_SQLITE" use-system-lib}) |
Another thing that might work instead of patching
|
@sogaiu thank you, this worked for me. I think it is worth updating |
I agree in principle, but I'm not sure in this case what the content of the PR ought to be. I don't know how Tweaking the README does seem more practical. If that's a path that makes sense to you, perhaps mentioning |
Well, I think the current
I assume this should be a janet wrapper around this shell command:
which would give correct result:
If my assumption is correct, than this |
If you try with the following diff to diff --git a/project.janet b/project.janet
index 14185b0..c8a6b0a 100644
--- a/project.janet
+++ b/project.janet
@@ -11,7 +11,7 @@
(defn pkg-config [what &opt env]
(default env {})
- (def p (os/spawn ["pkg-config" ;what] :p (merge {:out :pipe} env)))
+ (def p (os/spawn ["pkg-config" ;what] :pe (merge {:out :pipe} env)))
(:wait p)
(unless (zero? (p :return-code))
(error "pkg-config failed!")) It seems to work here. |
Yeah, this works for me as well. Thank you very much for the patch & your help! |
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:
The text was updated successfully, but these errors were encountered: