Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 332427 - app-arch/dpkg-1.15.8.3 fails to compile on Solaris (and probably Darwin/FreeBSD)
Summary: app-arch/dpkg-1.15.8.3 fails to compile on Solaris (and probably Darwin/Free...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Solaris
: High normal (vote)
Assignee: Debian-related package maintainers [DISBANDED]
URL: http://lists.debian.org/debian-dpkg/2...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-12 13:41 UTC by Fabian Groffen
Modified: 2010-08-13 15:16 UTC (History)
1 user (show)

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


Attachments
solaris.patch (solaris.patch,794 bytes, patch)
2010-08-12 13:42 UTC, Fabian Groffen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2010-08-12 13:41:52 UTC
First, it fails to compile like this:

update-alternatives.c: In function ‘alternative_select_choice’:
update-alternatives.c:1410: error: ‘_POSIX_PATH_MAX’ undeclared (first use in this function)
update-alternatives.c:1410: error: (Each undeclared identifier is reported only once

After adding the missing limits.h include, it fails to link:

  CCLD   update-alternatives
update-alternatives.o: In function `error':
update-alternatives.c:(.text+0x111): undefined reference to `libintl_gettext'
update-alternatives.o: In function `xstrdup':
update-alternatives.c:(.text+0x1b7): undefined reference to `libintl_gettext'
update-alternatives.o: In function `altdb_parse_error':
update-alternatives.c:(.text+0x28b): undefined reference to `libintl_gettext'
update-alternatives.c:(.text+0x2a6): undefined reference to `libintl_gettext'
update-alternatives.o: In function `xasprintf':
update-alternatives.c:(.text+0x365): undefined reference to `libintl_gettext'
update-alternatives.o:update-alternatives.c:(.text+0x3fb): more undefined references to `libintl_gettext' follow

after fixing this in the makefiles, it installs fine.

Please review attached patch.  It doesn't break anything when compiling on Linux here.  If ok, I'd like to add it to the ebuild.  I will report the patch upstream too.
Comment 1 Fabian Groffen gentoo-dev 2010-08-12 13:42:24 UTC
Created attachment 242571 [details, diff]
solaris.patch
Comment 2 SpanKY gentoo-dev 2010-08-12 13:44:37 UTC
pretty sure you want LTLIBINTL
Comment 3 Fabian Groffen gentoo-dev 2010-08-12 13:50:27 UTC
thought so too, but couldn't spot the use of libtool
Comment 4 SpanKY gentoo-dev 2010-08-12 17:18:21 UTC
i assumed it used libtool based on the automake syntax in use, but i guess if it doesnt, that patch is the way to go
Comment 5 Fabian Groffen gentoo-dev 2010-08-12 17:18:52 UTC
I need --disable-compiler-warnings added to econf on Darwin, since -Wvla seems
not to be a valid flag there (added as WFLAG, enabled by default):
cc1: error: unrecognized command line option "-Wvla"
Comment 6 Fabian Groffen gentoo-dev 2010-08-13 05:59:28 UTC
Would it be possible to bump to 1.15.8.4 with econf --disable-compiler-warnings?
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2010-08-13 15:16:06 UTC
It's fixed in 1.15.8.4:

   * Fix compilation on Solaris and Darwin:
     - Link update-alternatives against libintl if libc does not have i18n
       support.
     - Include <limits.h> for _POSIX_MAX_PATH in update-alternatives.
     Thanks to Fabian Groffen <grobian@gentoo.org>.


http://packages.qa.debian.org/d/dpkg/news/20100813T050215Z.html