Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 430266 - app-arch/xz-utils fails to build on NetBSD
Summary: app-arch/xz-utils fails to build on NetBSD
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 NetBSD
: Normal normal (vote)
Assignee: Gentoo Prefix
Depends on:
Reported: 2012-08-07 04:42 UTC by dougztr
Modified: 2017-11-15 17:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description dougztr 2012-08-07 04:42:14 UTC
xz-utils cannot be bootstrapped or emerged without heroic measures on prefix NetBSD because libtool fails with the following:

../../libtool: line 964: print: command not found
../../libtool: line 898: print: command not found

** libtool line 70 **
# An echo program that protects backslashes.
ECHO="print -r --"

** libtool line 140 **
# Command to associate shared and link libraries.
sharedlib_from_linklib_cmd="print -r --"

The libtool file is generated automagically by configure, so it cannot be patched in the normal fashion. Likewise I have not been able to locate any *.in or *.config files within the xz-utils source tree that seem to bear any relevence to what is actually created. Line 40 of configure seems to begin a section which tests for and sets an echo variable, but commenting out the entire section made no difference for me. And since configure can be regenerated, trying to patch it is not wise anyways.

The heroic workaround is to run "ebuild xz-utils configure" then change to the working directory and change the above to use the bash builtin echo command.


From irc, ormaaj pointed out that bash built with USE=plugins does provide a print command; however the version installed by prefix does not seem to have them. I would suggest finding a way to get that into and make any other changes necessary. I will follow on his tip and test it when I can.
Comment 1 Fabian Groffen gentoo-dev 2012-08-07 07:50:08 UTC
Just FYI: we (Prefix) failed to do a port to NetBSD and OpenBSD a long time ago.  So all of these bugs are just very low prio to me, until you can show me there's hope to get @system emerged.
Comment 2 dougztr 2012-08-09 23:59:54 UTC
A great way to work around this is to set the following environment variable:

export CONFIG_SHELL="$EPREFIX/bin/bash"

This will force libtool to use bash, and it will not want to use the ksh print command. I just tested it out with positive results. It should also resolve the numerous other libtool errors that I have gotten from other packages.
Comment 3 Fabian Groffen gentoo-dev 2012-08-10 06:38:46 UTC
ah, perhaps that's something that would be a general trick on NetBSD (e.g. profiles) to set CONFIG_SHELL.  Do you get much further if you export it globally?
Comment 4 Fabian Groffen gentoo-dev 2017-11-15 17:50:25 UTC
sorry, netbsd support stopped a while ago