[<<][nixos][>>][..]
Fri Nov 1 10:16:07 EDT 2019

why is XML/Parser.pm not showing up?

  # Debug
  perl = pkgs.perl;
  xmlparser = pkgs.perlPackages.XMLParser;

[nix-shell:~/humanetics/top_src/timesys]$ find $xmlparser | grep XML/Parser.pm
/nix/store/kdlcgmbcsx4wdc94zg2x3kfzl2pd0csp-perl5.28.1-XML-Parser-2.44/lib/perl5/site_perl/5.28.1/x86_64-linux-thread-multi/XML/Parser.pm

It is actually there:

tom@panda:/usr/lib/perl5/site_perl/5.28.1/x86_64-linux-thread-multi/XML$ ls -l Parser.pm
-r--r--r-- 1 tom tom 27108 Jan  1  1970 Parser.pm

So why is it not found?


Can't locate XML/Parser.pm in @INC (you may need to install the XML::Parser module)
(@INC contains:
/nix/store/kiapz3kjvb46jbvswdjkmrzg0s4l2zm7-perl-5.28.1/lib/perl5/site_perl/5.28.1/x86_64-linux-thread-multi
/nix/store/kiapz3kjvb46jbvswdjkmrzg0s4l2zm7-perl-5.28.1/lib/perl5/site_perl/5.28.1
/nix/store/kiapz3kjvb46jbvswdjkmrzg0s4l2zm7-perl-5.28.1/lib/perl5/5.28.1/x86_64-linux-thread-multi
/nix/store/kiapz3kjvb46jbvswdjkmrzg0s4l2zm7-perl-5.28.1/lib/perl5/5.28.1
) at ./test.pl line 3.
BEGIN failed--compilation aborted at ./test.pl line 3.


I guess in general this needs a wrapper that has the paths set up properly.

Googling for this I don't really find much.

EDIT: So I've created a wrappre and added the path, but apparently
timesys insists on using /usr/bin/perl:


But the

checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.28.1
checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool

Maybe PATH gets reset?  The config.ac uses AC_PATH_PROG

AC_PATH_PROG(PERL, perl)
if test -z "$PERL"; then
   AC_MSG_ERROR([perl not found])
fi

https://stackoverflow.com/questions/53089239/ac-path-prog-always-return-usr-bin-prog-instead-of-my-own-path-prog

It fails on not finding libunistring.so.0
The FHS has libunistring.so.2 from upstream version 0.9.10

build@gwtest-kz:~$ dpkg -l |grep libunistring
ii  libunistring0:amd64                   0.9.3-5.2+b1                         amd64        Unicode string library for C


How can 0.9.10 be soversion=2 and 0.9.3 be soversion=0


Yeah I don't want to get into this shit.  Can I just run a script before sealing up the FHSUserEnv?

EDIT: Use extraBuildCommands to create a symlink.


Next it does a hickup on fakeroot:

make: Entering directory '/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209'
-- Reading configuration and build instructions -- 1572623758 [Fri, 01 Nov 2019 15:55:58 +0000]
Please wait, this will take some time...
-- packaging toolchain (initial) -- 1572623760 [Fri, 01 Nov 2019 15:56:00 +0000]
true
cd  /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain && \
PATH=/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/fake/bin:\
/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/ccache:\
/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/bin:\
/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/usr/bin:\
/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/sbin:\
/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/usr/sbin:\
/nix/store/axbgfpy80dnpxwx1gkjsjj2iqz9sj9lq-src/fhs-wrappers/bin:\
/run/wrappers/bin:\
/usr/bin:\
/usr/sbin\
 fakeroot -- /bin/bash -c "if [ -f  /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/.pkg.sh ]; then /bin/bash  /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/.pkg.sh; rm  /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain/.pkg.sh; fi; /usr/bin/tar czf /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain-initial-armv7l-timesys-linux-gnueabi.tgz ."
fakeroot: preload library `libfakeroot.so' not found, aborting.
make: *** [include/host.mk:32: /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/toolchain-initial-armv7l-timesys-linux-gnueabi.tgz] Error 1
make: Leaving directory '/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209'
+ exit 1
builder for '/nix/store/6fkha5v7dfvcbbm6mqqsj40md7rqqb9q-timesys-vybrid.drv' failed with exit code 1
error: build of '/nix/store/6fkha5v7dfvcbbm6mqqsj40md7rqqb9q-timesys-vybrid.drv' failed

It's messing with PATH again.


Next error:

chmod u+s /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox
chmod: changing permissions of '/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox': Operation not permitted
make: *** [target/software/System/busybox/busybox.mk:49: /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/busybox-1.22.1/.stamp_init_rfs_installed] Error 1
make: Leaving directory '/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209'
+ exit 1
+ exit 1
builder for '/nix/store/h3ng02c4ggf1mcmihkl9rn3mld5c6msw-timesys-vybrid.drv' failed with exit code 1
error: build of '/nix/store/h3ng02c4ggf1mcmihkl9rn3mld5c6msw-timesys-vybrid.drv' failed


Maybe this is supposed to run inside of fakeroot?


Nope it's a nix thing.

In debian it works fine:

tom@panda:~/top_src/timesys$ chmod u+s /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox


Wait a minute.

In the nix shell it works fine too:

[nix-shell:~/top_src/timesys]$ 
[nix-shell:~/top_src/timesys]$ chmod u-s /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox


[nix-shell:~/top_src/timesys]$ 
[nix-shell:~/top_src/timesys]$ chmod u+s /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox


just not in the chroot?

Nope works also.

WTF?

I've removed the error by wrapping chmod, but this probably should be fixed.


chmod u+s /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox
/usr/bin/chmod: changing permissions of '/home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox': Operation not permitted
ERROR: chmod u+s /home/tom/priv/git-private/humanetics/top_src/timesys/factory-20141209/build_armv7l-timesys-linux-gnueabi/rfs/bin/busybox


Running into the same issue for gw_buildroot.  This was working yesterday...


chmod 4755 /home/tom/priv/git-private/humanetics/top_src/gw_buildroot/target/bbb/host/bin/mount
chmod: changing permissions of '/home/tom/priv/git-private/humanetics/top_src/gw_buildroot/target/bbb/host/bin/mount': Operation not permitted
make[5]: *** [Makefile:12748: install-exec-hook-mount] Error 1
make[5]: *** Waiting for unfinished jobs....


This is something that works ok inside nix-shell, but not inside
nix-build.

A temporary workaround is to run the build in nix-shell, then package
it up in nix-build and fix the issues later.




[Reply][About]
[<<][nixos][>>][..]