The clue to build ppc64 RPM’s

Posted on Thursday, 26th June, 2008 in Life

Remember, I talked about building RPM’s on SLES10SP2 on ppc64 ? Well, turns out I was rather stupid .. and it was rather simple (don’t ask me why I didn’t think of that). I tried asking solar, I used google (apparently with the wrong search parameters), nothing though. Not a clue.

Today it bugged me again, so I used google again. This time with “ppc64 suse rpmbuild“, and guess what I saw within the preview of the second hit ..

1
rpmbuild -ba --target ppc64 myfile.spec

And here I thought I was missing something, turns out I was really stupid though .. *shrug* Building stuff like nagios works with that just fine ..

Update: or not. It worked only a single time and is broken ever since again. Guess I’m gonna reload the box on Tuesday.


Building RPMs on SLES10SP2-ppc64

Posted on Saturday, 14th June, 2008 in Life

Well, it turns out that building stuff on ppc64 is a *real* pain in the ass, at least on anything SUSE related. I do have to tweak every damn spec to include this:

1
2
3
%ifarch ppc64
export LDFLAGS="$LDFLAGS -m64"
%endif

Otherwise, ld is gonna fail when linking, as it’s gonna try linking the generated 64bit code (-m64 is passed on via RPM_OPT_FLAGS to CFLAGS) as 32bit code, which ain’t gonna work at all …

On top of that, stuff ain’t building due to multiple problems (for example nagios and vim, cause ld is unable to find the fitting -lperl (for nagios) and -lXt (for vim)) as well as source errors …

 gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I/usr/include -D_FREETDS_LIBRARY_SOURCE -DUNIXODBC -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG=4 -D_REENTRANT -D_THREAD_SAFE -DDEBUG=1 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -pthread -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -Wdeclaration-after-statement -MT connectparams.lo -MD -MP -MF .deps/connectparams.Tpo -c connectparams.c  -fPIC -DPIC -o .libs/connectparams.o
In file included from connectparams.c:22:
../../include/config.h:375:1: warning: "SIZEOF_LONG" redefined
<command line>:1:1: warning: this is the location of the previous definition
connectparams.c:90: error: static declaration of `SQLGetPrivateProfileString' follows non-static declaration
/usr/include/odbcinst.h:170: error: previous declaration of `SQLGetPrivateProfileString' was here
make[3]: *** [connectparams.lo] Error 1
make[3]: Leaving directory `/srv/BUILD/freetds-0.82/src/odbc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/srv/BUILD/freetds-0.82/src/odbc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/srv/BUILD/freetds-0.82/src'
make: *** [all-recursive] Error 1

EPIA fun

Posted on Monday, 14th January, 2008 in Life

Well, as for replacing my current fileserver (which I seriously need to consider replacing), I’ll just pick up these things:

  • 3WARE 9550SXU-8LP (that’s 399,00€) plus riser card
  • VIA EPIA EK 8000EG (that’s 201,69€)
  • Kingston ValueRAM DIMM 1 GB DDR-400 (that’s 57,00€)
  • 4x Seagate ST31000340NS (that’s 279,00€ each - making a subtotal of 1.116,00€)

So after browsing some more for a replacement for my current fileserver, I’d like to share the latest stages with you people. Thanks to Mike (who mentioned that binutils-2.18* already does the LDFLAGS=”-Wl,-z,relro” part) I replaced it with “-Wl,-O1″. Same old place, there’s fresh stages … (and thanks again to Mike, with working util-linux-2.13-r2).

I also tried getting a Gentoo/Hardened stage for PowerPC working, but that fails as due to >glibc-2.3 needing =gcc-4*. Though luck ….

Oh, yeah. If anyone is looking for the specs, they are in my overlay.