Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390179 - sys-devel/gcc-config-1.5-r1: needs `tac` which is unavailable on some systems
Summary: sys-devel/gcc-config-1.5-r1: needs `tac` which is unavailable on some systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-11 12:14 UTC by Alexis Ballier
Modified: 2011-11-11 16:13 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Ballier gentoo-dev 2011-11-11 12:14:01 UTC
running gcc-config-1.5 on fbsd gives me:
/usr/bin/gcc-config: line 273: tac: command not found

please check for the availability of tac before using it. with this version, LD_PATH gets broken up andm right after installing it, I get stuff like:
Shared object "libstdc++.so.6" not found, required by "eix"

i unkeyworded the offending versions until a fix reaches the tree
Comment 1 SpanKY gentoo-dev 2011-11-11 15:24:13 UTC
-ENOUSEFULINFO

only people with access to bsd systems can debug this.  the g/bsd shell someone gave me sometime ago appears to be dead.
Comment 2 Alexis Ballier gentoo-dev 2011-11-11 15:43:46 UTC
(In reply to comment #1)
> -ENOUSEFULINFO
> 
> only people with access to bsd systems can debug this.  the g/bsd shell someone
> gave me sometime ago appears to be dead.

tac isnt available on fbsd... google sent me to this page:
http://www.gentoo.org/doc/en/articles/l-sed3.xml
(code listing 1.5 and the phrase below it)

therefore, the following patch will fix this problem:

--- /usr/bin/gcc-config	2011-11-11 10:41:00.356924602 -0300
+++ gcc-config	2011-11-11 12:39:24.888229120 -0300
@@ -269,7 +269,7 @@
 		MY_LDPATH=$(${SED} -n \
 			-e '/^LDPATH=/{s|LDPATH=||;s|"||g;s|:|\n|g;p}' \
 			"${GCC_ENV_D}"/${REAL_CHOST}-* \
-			"${GCC_ENV_D}"/${CC_COMP} | tac
+			"${GCC_ENV_D}"/${CC_COMP} | sed -e '1!G;h;$!d'
 		)
 
 		# Pass all by default



Sorry, I assumed 'tac: command not found' was enough info to infer that tac wasn't available :=)
Comment 3 SpanKY gentoo-dev 2011-11-11 15:52:09 UTC
ok, so let's focus on the core issue and not the symptoms.  issue: `tac` not available.  symptom: LDPATH is wrong.

i'll take a look.
Comment 4 SpanKY gentoo-dev 2011-11-11 16:13:01 UTC
i think i misread your original summary as the focus was on LDPATH being wrong rather than tac missing.  oh well.

should be all set now in the tree; thanks for the report!

Commit message: Add a fallback when tac is unavailable as suggested by Alexis Ballier
http://sources.gentoo.org/sys-devel/gcc-config/files/gcc-config-1.5?r1=1.5&r2=1.6
http://sources.gentoo.org/sys-devel/gcc-config/gcc-config-1.5-r2.ebuild?rev=1.1