-
Notifications
You must be signed in to change notification settings - Fork 11
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
Problems packaging for NixOS #13
Comments
The git build dependency that's mentioned in the support record may be removed in a while. I think I mostly have that working, and it's likely that Regarding the |
Yes. |
Presuming you're using a fresh clone, then I'm really not sure what's going on unless you have a guile install whose m4 macros have been adjusted in a way that's breaking things, or the upstream guile m4 macros have a bug with respect to your platform. Just guessing, though. Could take a look at those lines in the configure script and see if you can spot anything that doesn't look OK, but from the error message I'd guess the real issue may be in the GUILE_PKG macro, which here is in /usr/share/aclocal/guile-3.0.m4. I suppose you could find the relevant file on your system, and compare it to the upstream copy |
It looks like the guile build might be doing something funny. Post-build steps here. I will check out that file when I get a chance. |
Oh, if your guile package isn't installing that .m4 macro file in the right place for your system, then that might well be the problem. I believe |
Ah, yeah that could be the reason. I did some light googling... NixOS/nix#3658 is a ticket where some contributor states "the m4 files must be present in the tarball." Also found this which suggests I need to provide |
I suspect that if you just copy the m4 file into ./m4 in the lokke tree it might work, that or put it "somewhere" and then |
Got it to build w/ a lot of help from the nixos community on matrix. doesn't run, but problems for another day.... |
runtime error after build
|
It looks like lokke's scm files aren't getting into the share dir, and therefore not in the load path. 🤔 |
@rlbdv is there a make target which installs Lokke's scm files? Here's a copy of my build output: https://gist.github.com/crinklywrappr/f91271b41355bdf8e3bf2bbde0ce91be |
Attempting to run the lokke repl by starting w/ the scm files in the load path.
|
Basically the same issue when loading from the guile repl.
|
I've run out of things to try and am definitely open to ideas. |
@rlbdv how should I set up the environment if I want to execute lokke from inside a guile repl? I tried this on pop-os and it doesn't quite work.
EDIT: Got that part working, kinda....
EDIT2: that also happens with |
Hmm, Thanks for reporting the issue. |
Thanks. But really all I was trying to do was take all the magic out of it so hopefully I could understand what was going wrong with my nix build and I'm not any closer tbh. |
OK, so the repl problem is just an issue with the docs. I changed the ,module (lokke ns lokke user)
,L lokke I'll update the docs in a while. |
And regarding running You can see exactly what happens in We may change some of that eventually, but if it helps, that's how it works right now. In any case, here at least, and from a completely clean checkout, this allows me to build a lokke that will run from some other directory (using the current ./setup
autoreconf -fi
./configure --prefix /some/other/directory
make -j5 check
make install
cd /some
some/other/directory/bin/lok Is that at all relevant to your current problem (not sure I know exactly where you're having trouble now). |
very cool. 😎
So, based on this I think I need to get some more assistance from the nix community to determine
I suspect there is a strong likelihood the lokke executable won't work on nix. It still looks like magic to me (search the project for Maybe I can package a simple |
Hmm, here I have: (main)$ git grep LOKKE_LIBDIR
Makefile.am.in:lokke_cflags += -DLOKKE_LIBDIR='"$(modlibdir)"'
Makefile.am.in:lokke_dev_cflags += -DLOKKE_LIBDIR='"$(abs_top_srcdir)/lib/.libs"'
lokke.c: setenv_or_die ("LTDL_LIBRARY_PATH", LOKKE_LIBDIR);
lokke.c: int rc = asprintf (&path, "%s:%s", LOKKE_LIBDIR, env); And it may already be possible, but if not we can arrange for it to be possible to set the defaults for the executable to be correct for nix, if you can find out where nix expects the lokke module source tree (the .scm files), the compiled tree (the .go files), and the shared libs (the .so files) to be installed. i.e. we can (or will be able to after a few changes) adjust the embedded defaults via suitable |
As a quick sanity check, I ran this test on nix by telling
😕 |
Made a little more progress. So now I am getting an error with the builder.
|
I am going to assume that this is due to some issue w/ Guile 3.0.7 ... Nixos is a couple versions ahead of Debian. If I get some time I may try to compile 3.0.5 on nixos or vice-versa. |
I'm using Debian's 3.0.7-1+b1 here, so maybe that's fine. I forget, does lokke build and pass the tests fine "normally" for you? i.e. without involving nix (or whatever's removing the .git dir, etc.)? And the patches I've mentioned that I'm still working on will remove the need for that You might also want to make sure you don't have cached files interfering somehow. When it decides to autocompile, guile will store the result in |
Oh, and if you haven't, double-check that you have the latest commit (and maybe a clean tree) -- I did fix some syntax-related issues in the not too distant past. |
Not sure if it'll help, but just pushed changes that remove the |
Thanks. I will update and give it a shot. |
I was able to simplify the build file a bit by removing the calls to let
pkgs = import <nixpkgs> {};
unstable = import <nixos-unstable> {};
in with pkgs;
stdenv.mkDerivation {
name = "lokke";
src = pkgs.fetchgit {
name = "lokke-repo";
url = "https://github.com/lokke-org/lokke.git";
rev = "1e14bd689d3f04d64b4ea4b481307e8d381a71d3";
sha256 = "0p3z35fiwdsw6mkpbq3fn10g67y6klvvmvyc81xdw1lz55mazwi3";
};
nativeBuildInputs = [autoreconfHook];
buildInputs = [man gettext pcre2 pcre2.dev
libunistring libunistring.dev
guile_3_0 guile_3_0.dev
autoconf automake
libtool pkg-config];
postPatch = ''
patchShebangs .
./setup
'';
doCheck = true;
} But it continues to error.
|
That's likely because your guile 3.0.7 is "broken", i.e. you'll need to use a different version or add this patch: https://git.savannah.gnu.org/cgit/guile.git/commit/?id=d79a226359d28f4a1dc5df136e5544d699903a96. We added it to debian a while back, but a normal 3.0.7 won't have it. |
There are tools to alter portions of a derivative in nixos. I will attempt to apply this patch. That section of the learning material was out of reach for me, so I may need to ask someone for assistance. |
If it helps, if you can install the build dependencies, you can also just clone guile and check out 3.0.7, |
Thanks @rlbdv Applying that patch pushed the build process a bit further. Unfortunately, I am now seeing this build error.
|
Hmm, what do you see for And what happens if you try this from the lokke source tree:
|
Just checking back to see if this was still relevant. |
Closing for now. I'll probably take another crack at it after I replace my broken laptop (won't boot) |
User support record here
I get this error when running
./configure
The text was updated successfully, but these errors were encountered: