Closed lucaswerkmeister closed 7 years ago
Actually, I had misunderstood packaging, sorry… $(PREFIX)
should be /usr
, and the package build tool-specific directory only comes into play in the make install
step, as DESTDIR
. I’ll check if the tests work better with those changes.
Tests should be able to run now (modulo portability issues) without requiring the programs to be installed.
Okay, the Bash tests work now, but the first “paper example” fails with “dir.sh failed”.
Okay, lots of commands are giving “bad interpreter” errors:
/usr/libexec/dgsh/df: /home/lucas/git/aur/dgsh-git/pkg/dgsh-git/usr//libexec/dgsh/dgsh-wrap: bad interpreter: No such file or directory
Thank you for the input! Is there a file named /home/lucas/git/aur/dgsh-git/pkg/dgsh-git/usr//libexec/dgsh/dgsh-wrap
? What about /home/lucas/git/aur/dgsh-git/pkg/dgsh-git/usr/libexec/dgsh/dgsh-wrap
? (Without the double slash.) Will this be the final location of the commands? I doubt it. I wonder why the wrong path has been hardcoded in the commands. Is there a way to obtain the actual final installation location?
No, the pkg
directory is completely empty at this point, and I’m not sure how the path got in there. There are dgsh-wrap
files in /home/lucas/git/aur/dgsh-git/src/dgsh/core-tools/src/
and …/src/dgsh/build/libexec/dgsh/
. (makepkg
clones the dgsh
repository into src/dgsh
, everything before src
is the folder where I’m running makepkg
.)
The reason you get the bad interpreter
error is because the pkg
directory is empty, so the file cannot be found. The path is being created by the unix-tools/install-wrapped.sh
. We can avoid the explicit path at the cost of an additional exec system call, by replacing the hard-coded path of the interpreter with #!/usr/bin/env dgsh-wrap ...
and ensuring dgsh-wrap is in the path. What do you think?
Well, I’m still confused why pkg
shows up in there at all, that directory shouldn’t be mentioned until we get to the install
phase (and check
is before that). But I can’t investigate that right now because there seems to be a build error:
make -C unix-tools make MAKEFLAGS=
make[1]: Entering directory '/home/lucas/git/aur/dgsh-git/src/dgsh/unix-tools'
make[1]: *** No rule to make target '../core-tools/src/libdgsh.a', needed by 'w'. Stop.
make[1]: Leaving directory '/home/lucas/git/aur/dgsh-git/src/dgsh/unix-tools'
make: *** [Makefile:78: unix-tools] Error 2
That's odd, the libdgsh.a
library should have been built already. Could you please post the entire log of a fresh clean compile?
Sure, here it is (includes configure step, too): https://gist.github.com/lucaswerkmeister/dd87df3f529ca292a47180036c648abb
And here’s the build script, by the way: https://github.com/lucaswerkmeister/dgsh-git-aur – I think a few non-Arch distros package the Arch build tools as well (at least Fedora does, I hear), and just running makepkg
in that directory should yield the same result. (It will take a while if you don’t have some sort of -jN
configured in your MAKEFLAGS
in /etc/makepkg.conf
.)
Thanks!
I just scanned the log you provided, but I couldn't spot the build error you mentioned.
For the build error you mentioned, the corresponding target (line no 11665, 11666) seems to have nothing more to do. make
enters and exits immediately.
Is it a clean compile?
Also, I didn't find the execution of the target make -C unix-tools build-install
The last line I see in the log is no 11229.
Is it the full output?
Oh, my bad, apparently the error is printed to stderr, which I didn’t include. I’ll do another run.
There was an implicit dependency within the unix-tools
Makefile to libdgsh.a
, which is built in core-tools
.
Because the dependency was not made explicit to make
, the latter parallelised the execution of make -C core-tools
with make -C unix-tools
.
Please pull and re-run.
Okay, thanks, that fixed the build – now we’re back to test failures. Here’s the tail of the output (no errors before that, it seems): https://gist.github.com/lucaswerkmeister/62feb35787af5c7e338d2bfca9c58f78
There are also sixteen coredump files (four for conftest
, twelve for dgsh-w
), which I can send to you if you’d like.
(I guess we could also move this to a new issue by this point…)
I refactored dgsh-w
. Please pull and try again. If the problem persists, please also randomly select, say, 3 coredump files of dgsh-w
processes and post them.
Thanks, that seems to have fixed it. Now there’s a path error, apparently:
which: no sfimag in (/home/lucas/git/aur/dgsh-git/src/dgsh/build/bin:/home/lucas/bin:/usr/local/sbin:/usr/local/bin:/usr/bin)
Skip test ft2d.sh
ft2d.sh successful
which: no nmrPipe in (/home/lucas/git/aur/dgsh-git/src/dgsh/build/bin:/home/lucas/bin:/usr/local/sbin:/usr/local/bin:/usr/bin)
Skip test NMRPipe.sh
NMRPipe.sh failed
make[1]: *** [Makefile:156: test-bash] Error 1
make: *** [Makefile:113: test-unix-tools] Error 2
==> ERROR: A failure occurred in check().
There are no files named sfimag
or nmrPipe
anywhere in the build directory. Might be another race condition due to undeclared dependencies – I’ll try a -j1
build. EDIT: Nope, same error.
It's fair not to find sfimag
or nmrPipe
because they are available with specific libraries not found by default in typical systems.
This is why NMRPipe.sh
test is skipped as we would expect.
However, from the following line it is evident that it is not actually skipped, but executed anyway.
Then the test fails as it should, because it depends on programs not installed in the system.
An exit
command when a test is skipped was missing from the script that runs the tests.
Can you please pull and try again?
And now the build fully succeeded – thank you very much!
Shall I publish the AUR package now?
Are you OK with issue #70 ? I am working on it now.
Oh, right, I’m currently still removing that in the PKGBUILD
… if you want to fix the issue on your end first, I’ll wait for that.
Currently, some tests seem to assume that the built program has already been installed. That is, they seem to assume the following workflow:
make
make install
make test
Both
dh
(Debian) andmakepkg
(Arch), however, run the tests before the “install” step:make
make test
make install
For building packages for these distributions, it would be good if the latter sequence was supported.
In particular:
test-bash
goal inunix-tools/Makefile
assumes that there is abash
in$(DGSHPATH)
, which is$(PREFIX)/libexec/dgsh
. Beforemake install
,$(PREFIX)
is empty.run_test.sh
script inunix-tools
(also called byunix-tools/Makefile
’stest-bash
goal) goes even further, and assumes that there is adgsh
binary in thePATH
– without, as far as I can tell, thePATH
being adjusted anywhere. In a distribution package build setup, this won’t even work after amake install
, since the$(PREFIX)
will be some directory to be consumed by the package build tool, not something like/usr
or/usr/local
that would actually be in thePATH
.Aside: do you have a chat channel or similar for dgsh? I have some other packaging concerns that I’d like to discuss with you…