Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350677 - sys-fs/e2fsprogs-1.41.14 breaks sys-boot/silo (undefined references to posix_memalign)
Summary: sys-fs/e2fsprogs-1.41.14 breaks sys-boot/silo (undefined references to posix_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: High critical (vote)
Assignee: Sparc Porters
URL: http://marc.info/?l=linux-sparc&m=129...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-05 13:33 UTC by 404 Error
Modified: 2011-02-11 00:19 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,15.99 KB, text/plain)
2011-01-10 19:04 UTC, Raúl Porcel (RETIRED)
Details
silo-1.4.14-r1.ebuild (silo-1.4.14-r1.ebuild,1.96 KB, text/plain)
2011-01-13 11:44 UTC, Alex Buell
Details
Tweaked posix_memalign.patch (to go into files/) (silo-1.4.14-posix_memalign.patch,345 bytes, patch)
2011-01-13 11:45 UTC, Alex Buell
Details | Diff
silo-1.4.14-r1.ebuild (silo-1.4.14-r1.ebuild,1.96 KB, text/plain)
2011-01-17 17:47 UTC, Alex Buell
Details
posix_memalign.patch (to go into files/) (silo-1.4.14-posix_memalign.patch,1.22 KB, patch)
2011-01-17 17:47 UTC, Alex Buell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 404 Error 2011-01-05 13:33:23 UTC
sys-fs/e2fsprogs-1.41.14 prevents  sys-boot/silo from being compiled : ld complains about undefined references on posix_memalign :

ld -m elf32_sparc -N -Ttext 0x280000 -Bstatic -o second crt0.o decomp.o ../common/console.o ../common/printf.o malloc.o ../common/jmp.o ../common/prom.o ../common/tree.o ../common/urem.o ../common/udiv.o ../common/stringops1.o ../common/ffs.o ../common/divdi3.o ../common/udivdi3.o bmark.o main.o cmdline.o disk.o file.o misc.o cfg.o strtol.o ranges.o timer.o memory.o fs/libfs.a mul.o ../common/rem.o ../common/sdiv.o umul.o ../common/stringops2.o ls.o muldi3.o -lext2fs mark.o `sparc-unknown-linux-gnu-gcc -print-libgcc-file-name`
/usr/lib/libext2fs.a(inline.o): In function `ext2fs_get_memalign':
(.text+0x394): undefined reference to `posix_memalign'
/usr/lib/libext2fs.a(inode.o): In function `ext2fs_open_inode_scan':
(.text+0x1168): undefined reference to `posix_memalign'
/usr/lib/libext2fs.a(openfs.o): In function `ext2fs_open2':
(.text+0x2e4): undefined reference to `posix_memalign'
/usr/lib/libext2fs.a(rw_bitmaps.o): In function `write_bitmaps':
(.text+0x64): undefined reference to `posix_memalign'
/usr/lib/libext2fs.a(rw_bitmaps.o): In function `write_bitmaps':
(.text+0x264): undefined reference to `posix_memalign'
/usr/lib/libext2fs.a(rw_bitmaps.o):(.text+0x6e0): more undefined references to `posix_memalign' follow

This does not happen with e2fsprogs-1.41.12 and e2fsprogs-libs-1.41.12. Very annoying because SILO is the bootloader for SPARC machines....


Reproducible: Always

Steps to Reproduce:




Portage 2.1.9.28 (default/linux/sparc/10.0, gcc-4.4.4, glibc-2.12.1-r3, 2.6.32-gentoo-r7 sparc64)
=================================================================
System uname: Linux-2.6.32-gentoo-r7-sparc64-sun4u-with-gentoo-2.0.1
Timestamp of tree: Tue, 04 Jan 2011 01:45:01 +0000
app-shells/bash:     4.1_p9
dev-lang/python:     2.4.4-r13, 2.5.4-r4, 2.6.5-r3, 2.7.1, 3.1.3
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.8
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.68
sys-devel/automake:  1.10.1, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.1.2, 4.4.4-r2, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="sparc ~sparc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=ultrasparc -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://192.168.2.2/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gcc64 gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline session sparc ssl sysfs tcpd unicode xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga r128 radeon sunbw2 suncg14 suncg3 suncg6 sunffb sunleo tdfx dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2011-01-06 16:50:33 UTC
Please, can you attach the full build.log and paste your "emerge -pv silo" output?
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2011-01-10 19:04:28 UTC
Created attachment 259491 [details]
build.log
Comment 3 Raúl Porcel (RETIRED) gentoo-dev 2011-01-10 19:05:07 UTC
@base-system: any help appreciated.

I'm sending this upstream anyway
Comment 4 404 Error 2011-01-10 19:15:51 UTC
Sorry guys, I didn't forget this bug, I am due to rebuild another SPARC chroot in a near future (this week I hope), will do a follow-up on the subject.
Comment 5 SpanKY gentoo-dev 2011-01-10 21:22:30 UTC
i dont understand what you need.  e2fsprogs uses posix_memalign, so provide it in silo if you want to use the libraries.  the function is pretty trivial to implement -- just read the desc of it in `man posix_memalign`.  all you need is like a call to malloc with some bit twiddlin.
Comment 6 Alex Buell 2011-01-10 22:23:21 UTC
Have you tested silo-1.4.14_p20100228 with e2fsprogs-1.41.14 yet?
Comment 7 Raúl Porcel (RETIRED) gentoo-dev 2011-01-12 19:06:16 UTC
I reported this upstream.

Testing is appreciated, as far as i've tested, it builds but silo breaks.
Comment 8 Raúl Porcel (RETIRED) gentoo-dev 2011-01-12 19:06:37 UTC
Patch is in http://marc.info/?l=linux-sparc&m=129468771631829&w=2
Comment 9 Alex Buell 2011-01-13 01:40:48 UTC
I've just patched silo with the patch from Dave Miller, and have tested it by installing new bootblock with silo -f, then rebooting. 

It will not boot - unknown ext2 error: 4294967295.

Comment 10 Alex Buell 2011-01-13 11:38:23 UTC
I have just looked at this again this morning. There appears to be a problem with the patch from David Miller, I had to spin a new patch based on it to be able to apply it cleanly to the e2fsprogs sources.

I then tried to build both unstable e2fsprogs, that went well. Silo compiled OK and was installed to /boot. On reboot, I got the same error that I had the night before. 

I strongly suspect that posix_memalign() does need to be implemented or linked from glibc as a static function (maybe extract what we need?) otherwise silo fails to boot. 

New ebuild and patch attached.
Comment 11 Alex Buell 2011-01-13 11:44:34 UTC
Created attachment 259694 [details]
silo-1.4.14-r1.ebuild
Comment 12 Alex Buell 2011-01-13 11:45:05 UTC
Created attachment 259695 [details, diff]
Tweaked posix_memalign.patch (to go into files/)
Comment 13 Alex Buell 2011-01-17 17:46:31 UTC
OK, I have now a newer ebuild and a new patch that solves this problem entirely for all current versions of e2fsprogs/e2fsprogs-lib (<=1.41.14), attached to this bug report.

Please test. 
Comment 14 Alex Buell 2011-01-17 17:47:06 UTC
Created attachment 260060 [details]
silo-1.4.14-r1.ebuild
Comment 15 Alex Buell 2011-01-17 17:47:42 UTC
Created attachment 260061 [details, diff]
posix_memalign.patch (to go into files/)
Comment 16 404 Error 2011-01-17 17:56:18 UTC
Nice job Alex, would be good to add a little note like "Required by e2fsprogs >= 1.41.14", remembering the role of a "callback" function is not trivial to guess.

Will test when I will have 2 minutes.
Comment 17 Raúl Porcel (RETIRED) gentoo-dev 2011-01-22 12:25:39 UTC
Fixed
Comment 18 404 Error 2011-02-11 00:19:23 UTC
Thank you, AFAK corrections are in silo-1.4.14_p20100228