Can't compile from master branch #1

Closed
opened 2021-05-04 01:16:42 +00:00 by arpunk · 6 comments
arpunk commented 2021-05-04 01:16:42 +00:00 (Migrated from github.com)

Hello @fare,

Been trying to get glow up and running but I get the following error while trying to compile gerbil-crypto:

$ gxpkg install github.com/fare/gerbil-crypto
... install github.com/fare/gerbil-crypto
... build github.com/fare/gerbil-crypto
... compile keccak
Gerbil v0.16-178-g17fbcb95 on Gambit v4.9.3-1389-g55b21ed9
*** ERROR IN std/misc/concurrent-plan#perform-plan/threads__% -- Failure to build (gxc: "keccak" "-cc-options" "-I/home/arpunk/.gerbil/pkg/github.com/fare/gerbil-crypto" "-ld-options" #f "-cc-options" #f) "(Argument 1) STRING or port settings expected\n(o
pen-process\n '(path: \"/usr/local/Gambit/bin/gsc\" arguments: (\"-:i8,f8,-8,t8\" \"-cc-o... #106\n)\n"
Process exited with non-zero status
512
(path: "/home/arpunk/.gerbil/pkg/github.com/fare/gerbil-crypto/build.ss" arguments: ("compile") environment: #f directory: "~/.gerbil/pkg/github.com/fare/gerbil-crypto" stdin-redirection: #t stdout-redirection: #f stderr-redirection: #f pseudo-termina...
$

I don't think I need any extra dependencies, my OpenSSL version is 1.1.1k if that's relevant. Do you have any workarounds I can try?

Hello @fare, Been trying to get `glow` up and running but I get the following error while trying to compile `gerbil-crypto`: ```sh $ gxpkg install github.com/fare/gerbil-crypto ... install github.com/fare/gerbil-crypto ... build github.com/fare/gerbil-crypto ... compile keccak Gerbil v0.16-178-g17fbcb95 on Gambit v4.9.3-1389-g55b21ed9 *** ERROR IN std/misc/concurrent-plan#perform-plan/threads__% -- Failure to build (gxc: "keccak" "-cc-options" "-I/home/arpunk/.gerbil/pkg/github.com/fare/gerbil-crypto" "-ld-options" #f "-cc-options" #f) "(Argument 1) STRING or port settings expected\n(o pen-process\n '(path: \"/usr/local/Gambit/bin/gsc\" arguments: (\"-:i8,f8,-8,t8\" \"-cc-o... #106\n)\n" Process exited with non-zero status 512 (path: "/home/arpunk/.gerbil/pkg/github.com/fare/gerbil-crypto/build.ss" arguments: ("compile") environment: #f directory: "~/.gerbil/pkg/github.com/fare/gerbil-crypto" stdin-redirection: #t stdout-redirection: #f stderr-redirection: #f pseudo-termina... $ ``` I don't think I need any extra dependencies, my OpenSSL version is 1.1.1k if that's relevant. Do you have any workarounds I can try?
fare commented 2021-05-10 02:14:51 +00:00 (Migrated from github.com)

Just to be clear—are you building using Gerbil as installed with Nix, or did you build your own Gambit and/or Gerbil? Is nix-shell in your $PATH ? The build system (more precisely, clan/building from gerbil-utils) assumes that if nix-shell is present then the library dependencies (i.e. openssl) shall be retrieved from Nix; otherwise it uses pkg-config at which point you need it installed and configured.

What does pkg-config --libs openssl and pkg-config --cflags openssl return? What do they print, what is the error status code if any?

Still, at the very least, this is a confusing error message, that should be improved upon.

Just to be clear—are you building using Gerbil as installed with Nix, or did you build your own Gambit and/or Gerbil? Is `nix-shell` in your `$PATH` ? The build system (more precisely, `clan/building` from `gerbil-utils`) assumes that if `nix-shell` is present then the library dependencies (i.e. openssl) shall be retrieved from Nix; otherwise it uses `pkg-config` at which point you need it installed and configured. What does `pkg-config --libs openssl` and `pkg-config --cflags openssl` return? What do they print, what is the error status code if any? Still, at the very least, this is a confusing error message, that should be improved upon.
arpunk commented 2021-05-10 13:52:43 +00:00 (Migrated from github.com)

I did build my own Gambit/Gerbil, both from latest master. I don't use nix, just plain Fedora.

$ pkg-config --libs openssl
-lssl -lcrypto
$ pkg-config --cflags openssl

$

The last command doesn't produce any output. FWIW the dependency used to compile just fine.

Edit: I'm going to try in another env I have available later this afternoon and will let you know how it goes.

I did build my own Gambit/Gerbil, both from latest `master`. I don't use `nix`, just plain Fedora. ``` $ pkg-config --libs openssl -lssl -lcrypto $ pkg-config --cflags openssl $ ``` The last command doesn't produce any output. FWIW the dependency used to compile just fine. Edit: I'm going to try in another env I have available later this afternoon and will let you know how it goes.
fare commented 2021-05-10 19:55:53 +00:00 (Migrated from github.com)

It looks like to me that there might be a bug in the pkg-config-options function in clan/building. If you're a knowledgeable Gerbil user, maybe you can help us debug it. I'll try to give it a try soon, but I'm a bit overwhelmed this week.

It looks like to me that there might be a bug in the `pkg-config-options` function in [`clan/building`](https://github.com/fare/gerbil-utils/blob/master/building.ss). If you're a knowledgeable Gerbil user, maybe you can help us debug it. I'll try to give it a try soon, but I'm a bit overwhelmed this week.
fare commented 2021-05-10 20:25:50 +00:00 (Migrated from github.com)

Aha, the issue is not openssl, but libsecp256k1. What do these return for you?

pkg-config --libs libsecp256k1
pkg-config --cflags libsecp256k1

I think the code might be working, but "just" failing to output a usable error message. I just pushed an update to gerbil-utils to improve the error message somewhat.

Aha, the issue is not openssl, but libsecp256k1. What do these return for you? ``` pkg-config --libs libsecp256k1 pkg-config --cflags libsecp256k1 ``` I think the code might be working, but "just" failing to output a usable error message. I just pushed an update to `gerbil-utils` to improve the error message somewhat.
arpunk commented 2021-05-10 23:19:03 +00:00 (Migrated from github.com)

You were right, the problem was the missing libsecp256k1 headers. It's now working properly, sorry for the noise.

You were right, the problem was the missing libsecp256k1 headers. It's now working properly, sorry for the noise.
fare commented 2021-05-11 07:47:11 +00:00 (Migrated from github.com)

Not noise at all: the build system was failing to output a useful error message, and the README was failing to document the dependency. Thanks a lot for the report!

Not noise at all: the build system was failing to output a useful error message, and the README was failing to document the dependency. Thanks a lot for the report!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mighty-gerbils/gerbil-crypto#1
No description provided.