Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117379 - svgalib undefined reference - __svgalib_port_in __svgalib_port_out
Summary: svgalib undefined reference - __svgalib_port_in __svgalib_port_out
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
Depends on:
Reported: 2006-01-01 12:37 UTC by Steve Egbert
Modified: 2006-01-04 07:47 UTC (History)
0 users

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

emerge -v world (2775-svgalib-1.9.21-r1.log,82.79 KB, text/plain)
2006-01-01 15:00 UTC, Steve Egbert

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Egbert 2006-01-01 12:37:31 UTC
Undefined references in svgalib-1.9.21-r1:


Steps to failure:

restorepalette.o restorepalette.c
restorepalette.c:110: warning: return type of `main' is not `int'
i686-pc-linux-gnu-gcc: -lX11: linker input file unused because linking not done
i686-pc-linux-gnu-gcc -Wall -Wstrict-prototypes -O2 -march=c3 -m3dnow -mmmx -fomit-frame-pointer -pipe -lX11 -L/usr/X11R6/lib -I../include -L../sharedlib -L../sharedlib -o restorepalette restorepalette.o -lvga -lm
restorepalette.o: In function `main':
restorepalette.c:(.text+0x140): undefined reference to `__svgalib_port_in'
restorepalette.c:(.text+0x152): undefined reference to `__svgalib_port_out'
restorepalette.c:(.text+0x165): undefined reference to `__svgalib_port_out'
restorepalette.c:(.text+0x1b3): undefined reference to `__svgalib_port_in'
restorepalette.c:(.text+0x1c6): undefined reference to `__svgalib_port_out'
collect2: ld returned 1 exit status
make[1]: *** [restorepalette] Error 1
make[1]: Leaving directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/utils'

# emerge --info
Portage 2.0.53 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2, 2.6.13-gentoo-r5c3br i686)
System uname: 2.6.13-gentoo-r5c3br i686 VIA Samuel 2
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
CFLAGS="-O2 -march=c3 -m3dnow -mmmx -fomit-frame-pointer -pipe -lX11 -L/usr/X11R6/lib"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=c3 -m3dnow -mmmx -fomit-frame-pointer -pipe -lX11 -L/usr/X11R6/lib"
FEATURES="autoconfig distlocks sandbox sfperms strict"
USE="x86 3dnow acpi alsa apache2 apm arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 bzlib c++ caps cdr crypt cups curl devmap doc eds emboss encode esd ethereal exif expat fam fbcon ffmpeg foomaticdb fortran gd gdbm geoip gif glut gmp gnome gnutls gpm gstreamer gtk gtk2 idea idn imap imlib ipv6 java jpeg junit kde lcms ldap libg++ libwww lids lmsensors mad mailwrapper mhash mikmod milter mime mmap mmx mng motif mp3 mpeg ncourses ncurses nls nocardbus nosendmail ogg oggvorbis opengl pam pcap pcre pdflib perl php png posix print pthreads python qt quicktime readline samba sasl sdl skey smime sms smtp snmp sockets spell ssl svga tcltk tcpd thread tiff truetype truetype-fonts type1-fonts udev userlocales vorbis xml xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"

distfiles #
Comment 1 SpanKY gentoo-dev 2006-01-01 13:39:38 UTC
post the whole `emerge svgalib` log as an attachment
Comment 2 Steve Egbert 2006-01-01 15:00:16 UTC
Created attachment 75954 [details]
emerge -v world

emerge log of svgalib-1.9.21-r1 package
Comment 3 SpanKY gentoo-dev 2006-01-01 17:18:10 UTC
use normal vanilla gentoo sources (2.6.13-gentoo) and see if it works
Comment 4 Steve Egbert 2006-01-01 20:19:46 UTC
Looks to me like a build procedure gone awry...

vga_helper.o does have the svgalib_port_in() function.
libvga.a archive does have the vga_helper.o object

Not sure why its failing....

server distfiles # cd /usr/portage/media-libs/svgalib/
server svgalib # ls
ChangeLog  files         svgalib-1.9.19-r3.ebuild  svgalib-1.9.23.ebuild
Manifest   metadata.xml  svgalib-1.9.21-r1.ebuild
server svgalib # ebuild svgalib-1.9.21-r1.ebuild compile
>>> md5 files   ;-) svgalib-1.9.21-r1.ebuild
>>> md5 files   ;-) svgalib-1.9.19-r3.ebuild
>>> md5 files   ;-) svgalib-1.9.23.ebuild
>>> md5 files   ;-) files/svgalib-1.9.19-devfs.patch
>>> md5 files   ;-) files/digest-svgalib-1.9.21-r1
>>> md5 files   ;-) files/digest-svgalib-1.9.19-r3
>>> md5 files   ;-) files/svgalib.devfs
>>> md5 files   ;-) files/svgalib-1.9.18-lrmi-gentoo-cflags.patch
>>> md5 files   ;-) files/svgalib-1.9.18-utils-include.patch
>>> md5 files   ;-) files/svgalib-1.9.19-dont-touch-ld.conf.patch
>>> md5 files   ;-) files/svgalib-1.9.19-gentoo.patch
>>> md5 files   ;-) files/svgalib-1.9.19-linux2.6.patch
>>> md5 files   ;-) files/svgalib-1.9.19-pci-get-class.patch
>>> md5 files   ;-) files/svgalib-1.9.19-pic.patch
>>> md5 files   ;-) files/svgalib-1.9.21-linux2.6.patch
>>> md5 files   ;-) files/svgalib-1.9.23-gentoo.patch
>>> md5 files   ;-) files/digest-svgalib-1.9.23
>>> md5 files   ;-) files/svgalib-1.9.21-gentoo.patch
>>> md5 files   ;-) files/svgalib.udev.perms.d
>>> md5 files   ;-) files/svgalib.udev.rules.d
>>> md5 src_uri ;-) svgalib-1.9.21.tar.gz
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.13-gentoo-r5c3br
>>> Checking svgalib-1.9.21.tar.gz's mtime...
>>> WORKDIR is up-to-date, keeping...
(cd staticlib/; \
 make -f /var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/src/Makefile libvga.a \
        SRCDIR="/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21" DLLFLAGS="" \
make[1]: Entering directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/staticlib'
make[1]: `libvga.a' is up to date.
make[1]: Leaving directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/staticlib'
(cd staticlib/; \
 make -f /var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/src/Makefile libvgagl.a \
        SRCDIR="/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21" DLLFLAGS="" \
make[1]: Entering directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/staticlib'
make -f ../gl/Makefile libvgagl.a srcdir=".." DLLFLAGS=""
make[2]: Entering directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/staticlib'
make[2]: `libvgagl.a' is up to date.
make[2]: Leaving directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/staticlib'
make[1]: Leaving directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/staticlib'
(cd sharedlib/; \
 make -f /var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/src/Makefile \
        SRCDIR="/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21" DLLFLAGS="-fPIC" \
make[1]: Entering directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/sharedlib'
make[1]: *** No rule to make target `../src/svgalib_helper.h', needed by `vga.o'.  Stop.
make[1]: Leaving directory `/var/tmp/portage/svgalib-1.9.21-r1/work/svgalib-1.9.21/sharedlib'
make: *** [sharedlib/] Error 2

!!! ERROR: media-libs/svgalib-1.9.21-r1 failed.
!!! Function src_compile, Line 60, Exitcode 2
!!! Failed to build shared libraries!
!!! If you need support, post the topmost build error, NOT this status message.
Comment 5 Steve Egbert 2006-01-01 20:28:13 UTC
make[1]: *** No rule to make target `../src/svgalib_helper.h', needed by
`vga.o'.  Stop.
Comment 6 Steve Egbert 2006-01-02 03:06:42 UTC
Workaround is by performing the following action:

emerge -C svgalib
emerge svgalib

On another platform, 'emerge --sync' also fixed this.

It would appear to me that the following action has transpired:

emerge =svgalib-1.9.21-r1'
  linking restorepalette
    using an OLDER LIBRARY of libsvga-1.9.18

This explains the error message of why the newly created wrapper function 'svgalib_port_in' and 'svgalib_port_out' cannot be resolved.
Comment 7 SpanKY gentoo-dev 2006-01-03 16:34:08 UTC
well where's the fun in that
Comment 8 SpanKY gentoo-dev 2006-01-03 16:59:54 UTC
you have garbage in your CFLAGS

remove that -L / -l crap
Comment 9 Steve Egbert 2006-01-03 20:05:00 UTC
(In reply to comment #8)
> you have garbage in your CFLAGS
> remove that -L / -l crap

So, it isn't a SLOT issue, but a /var/tmp/portage/svgalib containment issue and confining the link within that environment, right?

Does this mean I should craft a patch and submit it to the maintainer? Would the maintainer be you or the author of svgalib?
Comment 10 SpanKY gentoo-dev 2006-01-03 20:09:50 UTC
it is not a bug in portage or in the svgalib package

it's you breaking the package by using invalid cflags
Comment 11 Steve Egbert 2006-01-03 20:16:47 UTC
(In reply to comment #10)
> it is not a bug in portage or in the svgalib package
> it's you breaking the package by using invalid cflags

Incredulous... (doing a double-take at my /etc/make.conf)

I musta had a brain fart or something when I did this...

Thanks for the sharp eyes.