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
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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: ---


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

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:

   __svgalib_port_in
   __svgalib_port_out

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
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=c3 -m3dnow -mmmx -fomit-frame-pointer -pipe -lX11 -L/usr/X11R6/lib"
CHOST="i686-pc-linux-gnu"
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"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo ftp://sunsite.ualberta.ca/pub/unix/Linux/gentoo/ ftp://gentoo.risq.qc.ca/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.seren.com/gentoo http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://gentoo.ccccom.com ftp://gentoo.ccccom.com http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://mirror.tucdemonic.org/gentoo/ http://mirror.clarkson.edu/pub/distributions/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ndlug.nd.edu/pub/gentoo/ ftp://gentoo.agsn.ca/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.binarycompass.org http://gentoo.mirrored.ca/ ftp://gentoo.mirrored.ca/ http://mirror.datapipe.net/gentoo http://mirror.datapipe.net/gentoo http://gentoo.eliteitminds.com http://chod.cwru.edu/gentoo ftp://chod.cwru.edu/gentoo http://gentoo.cs.lewisu.edu/gentoo/ ftp://linux.cs.lewisu.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo http://modzer0.cs.uaf.edu/public/gentoo/ http://mirror.usu.edu/mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
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"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

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 libvga.so.1.9.21 \
        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/libvga.so.1.9.21] 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.