Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135644 - media-libs/jpeg-6b-r7 does not build on Gentoo/FreeBSD
Summary: media-libs/jpeg-6b-r7 does not build on Gentoo/FreeBSD
Status: RESOLVED DUPLICATE of bug 130889
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-05 09:33 UTC by Remy Oudompheng
Modified: 2006-06-05 09:35 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Oudompheng 2006-06-05 09:33:17 UTC
The jpeg-6b-r7 port does not build due to bad syntax of libtool (missing TAG, maybe because of the unusual name of the compiler ?), and undefined value (_SC_AVPHYS_PAGES : should it miss on a regular FreeBSD system ?). 

Here is emerge --info
=========================
Portage 2.1_rc4-r2 (default-bsd/fbsd/6.1/x86, gcc-4.1.1, freebsd-lib-6.1-r0, 6.1-STABLE i386)
=================================================================
System uname: 6.1-STABLE i386 i386
Gentoo Base System version 20060420
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  6.1
ACCEPT_KEYWORDS="x86 x86-fbsd ~x86 ~x86-fbsd"
AUTOCLEAN="yes"
CBUILD="i586-gentoo-freebsd6.1"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium-m -ftree-vectorize"
CHOST="i586-gentoo-freebsd6.1"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium-m -ftree-vectorize"
DISTDIR="/cosmic/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nostrip parallel-fetch sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/storage/build"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86-fbsd X cups dri gdbm gif gtk gtk2 ipv6 jpeg kdeenablefinal mmx ncurses nls ogg opengl oss pam perl png python readline sdl sse sse2 ssl tcpd truetype unicode usb vorbis xinerama xml xorg xv zlib elibc_FreeBSD input_devices_keyboard input_devices_mouse kernel_FreeBSD userland_BSD video_cards_radeon video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS


Here is a patch that fixes the build :
=======================================================
diff -Naur /tmp/jpeg-6b/configure jpeg-6b/configure
--- /tmp/jpeg-6b/configure	2006-06-05 17:55:19 +0200
+++ jpeg-6b/configure	2006-06-05 17:54:57 +0200
@@ -1533,7 +1533,7 @@
   chmod a+rx libtool-wrap
   O="lo"
   A="la"
-  LN='$(LIBTOOL) --mode=link $(CC)'
+  LN='$(LIBTOOL) --tag=CC --mode=link $(CC)'
   INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
   INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
 else
diff -Naur /tmp/jpeg-6b/jmemansi.c jpeg-6b/jmemansi.c
--- /tmp/jpeg-6b/jmemansi.c	2006-06-05 17:55:19 +0200
+++ jpeg-6b/jmemansi.c	2006-06-05 17:55:51 +0200
@@ -161,8 +161,8 @@
 {
   long phys_size;
 
-  if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1)
-    return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
+//  if ((phys_size = sysconf(_SC_AVPHYS_PAGES)) == -1)
+//    return DEFAULT_MAX_MEM; /* default for max_memory_to_use */
   if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0)
     return DEFAULT_MAX_MEM;
   return (long) (phys_size * 0.95);
diff -Naur /tmp/jpeg-6b/makefile.cfg jpeg-6b/makefile.cfg
--- /tmp/jpeg-6b/makefile.cfg	2006-06-05 17:55:19 +0200
+++ jpeg-6b/makefile.cfg	2006-06-05 17:57:08 +0200
@@ -141,7 +141,7 @@
 
 # How to compile with libtool.
 @COM_LT@.c.lo:
-@COM_LT@	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
+@COM_LT@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
 
 # How to use ansi2knr, when not using libtool.
 @COM_A2K@.c.o:
@@ -152,7 +152,7 @@
 # How to use ansi2knr AND libtool.
 @COM_A2K@.c.lo:
 @COM_A2K@	./ansi2knr $(srcdir)/$*.c knr/$*.c
-@COM_A2K@	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c knr/$*.c
+@COM_A2K@	$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c knr/$*.c
 @COM_A2K@	$(RM) knr/$*.c
 
 ansi2knr: ansi2knr.c
@@ -169,7 +169,7 @@
 
 # with libtool:
 libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
-	$(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
+	$(LIBTOOL) --tag=CC --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
 		-rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-06-05 09:35:20 UTC
Please just use ~x86-fbsd keyword or use the overlay, the issue there is patched.

About the libtool problem, re-emerge it after update or CHOST change, that will working.


*** This bug has been marked as a duplicate of 130889 ***