reddragdiva: (stress relief)
[personal profile] reddragdiva

Today, I discovered that Solaris 10 egrep is not quite the same as GNU egrep, and that this is important when developers assume all the world's a GNU.

When you run ./configure for sqlite, it tells you "checking for egrep... egrep", but make craps out with:

libtool: link: ranlib .libs/libsqlite3.a
egrep: syntax error
egrep: syntax error
libtool: link: ( cd ".libs" && rm -f "libsqlite3.la" && ln -s "../libsqlite3.la" "libsqlite3.la" )
./libtool --mode=link gcc  -g -O2 -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1   -DHAVE_READLINE=1 -I/usr/local/include/readline \
        -o sqlite3 ./src/shell.c libsqlite3.la \
        -lcurses -lrt -rpath "/home/iplayrad/sqlite/lib"
libtool: link: gcc -g -O2 -DOS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DHAVE_READLINE=1 -I/usr/local/include/readline -o .libs/sqlite3 ./src/shell.c  ./.libs/libsqlite3.so -lcurses -lrt -R/home/iplayrad/sqlite/lib
Undefined                       first referenced
 symbol                             in file
write_history                       /var/tmp//ccXy2ReD.o
stifle_history                      /var/tmp//ccXy2ReD.o
read_history                        /var/tmp//ccXy2ReD.o                            /var/tmp//ccXy2ReD.o
add_history                         /var/tmp//ccXy2ReD.o
ld: fatal: Symbol referencing errors. No output written to .libs/sqlite3
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sqlite3'

You get around this by running ./configure, then editing libtool to change EGREP="egrep" to EGREP="/usr/sfw/bin/gegrep", then running make. Owww.

Cross-platform, adj. Runs on Red Hat and SuSE.

(no subject)

Date: 2008-06-04 08:28 pm (UTC)
From: [identity profile] mstevens.livejournal.com
Fuzzy memory suggests future versions of solaris are going to be much more GNU-ish.

(no subject)

Date: 2008-06-04 08:35 pm (UTC)
From: [identity profile] mstevens.livejournal.com
It sounded at least possible that the GNU tools would take priority. We'll see though, it wasn't at all clear from the blog entry the scope of it.

(I must prod the sol machines at work and find out what version we're on, I think it's mainly sol 8).

(no subject)

Date: 2008-06-05 08:23 am (UTC)
From: [identity profile] hauntedunix.livejournal.com
The Sun reason for not adding things like recursive to their version of grep is along the lines of "There's already a tool for the job, so why duplicate functionality? Silly Linux fools". Truth is, 'ggrep' > 'grep foo bar -baz baq {}' :/

(no subject)

Date: 2008-06-05 02:59 am (UTC)
From: [identity profile] blarglefiend.livejournal.com
The default grep in OpenSolaris is still the Sun grep. No idea if that will change down the track, but that's how it is now.

(no subject)

Date: 2008-06-04 08:42 pm (UTC)
ext_8707: Taken in front of Carnegie Hall (bofh)
From: [identity profile] ronebofh.livejournal.com
You neglected to show what the egrep code looked like.

(no subject)

Date: 2008-06-04 08:57 pm (UTC)
From: [identity profile] alexmc.livejournal.com
No, you are correct, solaris grep is not the same as gnu grep on any level...

(no subject)

Date: 2008-06-05 12:27 am (UTC)
From: [identity profile] tcpip.livejournal.com
That sucks. It sucks because it's such an annoying problem with a fairly trivial solution but would have been a bugger to bugger to discover: 'egrep: syntax error'? I'd be conducting a sanity check on myself on seeing that..

(no subject)

Date: 2008-06-05 03:02 am (UTC)
From: [identity profile] blarglefiend.livejournal.com
One of my colleagues is currently preparing a new development environment for our devs. It's an X4600 running Solaris 10, and while the hardware is nice and spiffy, the laundry-list of demands from the devs -- which essentially comes down to "we want Linux, and a pony!" -- is not so spiffy.

One dude is demanding a current gnome-terminal. Another wants w3m. And of course GNU ls is essential.

Mind you, we only deploy on Solaris. We have no Linux in production and probably won't for some years at the earliest. So not only do we find ourselves having to provide a GNU userland, we have to do it in such a way that the binaries produced do not have any dependencies on that, because we can't install it on production.

(Don't ask me why not, if I had my way we'd just bloody well install Blastwave everywhere and be done with it...)

(no subject)

Date: 2008-06-05 05:11 am (UTC)
ext_243: (0wned)
From: [identity profile] xlerb.livejournal.com
I think that beats the mysterious Solaris-based build failure I got earlier today:

ld: fatal: relocation error: file: xml.o section: .rel.eh_frame symbol: : symbol has been discarded with discarded section: .gnu.linkonce.t._ZN3xml3tagD0Ev

(no subject)

Date: 2008-06-05 06:47 am (UTC)
From: [identity profile] steer.livejournal.com
Solaris really is a fucking pain.

Honestly, in this day and age...

OK, this problem is not solaris fault but presumably the person writing Makefile.am should have been a little more careful in their checks. (I sympathise with them because automake etc is a damned mystery -- I wrestle with it regularly now and break something every time).

(no subject)

Date: 2008-06-05 11:14 am (UTC)
From: [identity profile] steer.livejournal.com
Solaris' job is to be a piece of industrial machinery that works, keeps on working

I've little sympathy with any OS where patching is actually significant pain and effort.

I can see your point but my experience with Solaris is inevitably bad -- the kit is pricey and it's just damned hard to keep it going.

(no subject)

Date: 2008-06-05 06:53 am (UTC)
From: [identity profile] trayce.livejournal.com
The Robert Haigh stuff on that blog is excellent. Never heard of him, I love it.

(no subject)

Date: 2008-06-05 07:40 pm (UTC)
From: [identity profile] secretlondon.livejournal.com
The music bit told me I would have to wait 59 minutes to download something. I'm afraid i gave up.

(no subject)

Date: 2008-06-05 08:02 pm (UTC)
From: [identity profile] secretlondon.livejournal.com
We should music swap at some point, I need to get a portable drive first :)

(no subject)

Date: 2008-06-05 08:16 pm (UTC)
From: [identity profile] secretlondon.livejournal.com
Laptop only 20 gig though *ponder*

I'm doing precisely nothing all weekend so I'm certainly free. I can bring some music I reckon you'll like..

(no subject)

Date: 2008-06-07 11:53 am (UTC)
From: [identity profile] secretlondon.livejournal.com
i don't really wanna pub the day before work anyway. I'm not (yet) good enough at Monday mornings for that..

(no subject)

Date: 2008-06-08 01:11 pm (UTC)
From: [identity profile] secretlondon.livejournal.com
I haven't started on the job application (for this job permanently) which needs to be done for tomorrow :(

I think I'm gonna have to cancel - sorry.