Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 385531 - app-admin/logrotate-3.8.0: ecopy ebuild to eprefix fails compiling on Solaris
Summary: app-admin/logrotate-3.8.0: ecopy ebuild to eprefix fails compiling on Solaris
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Solaris
: Normal enhancement (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on: 386137
Blocks:
  Show dependency tree
 
Reported: 2011-10-03 18:10 UTC by Hector Rivas
Modified: 2012-08-10 18:44 UTC (History)
0 users

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


Attachments
Patch adding the dependency for dev-libs/libstrl (logrotate-3.8.0.ebuild.patch,614 bytes, text/plain)
2011-10-03 18:12 UTC, Hector Rivas
Details
Patch for the code itself, linking to libstrl and adding libiberty.h include (logrotate-3.8.0-lstr-prefix.patch,887 bytes, patch)
2011-10-03 18:13 UTC, Hector Rivas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hector Rivas 2011-10-03 18:10:33 UTC
I tried to compile app-admin/logrotate-3.8.0 in Solaris eprefix. It fails because it needs some string functions: asprintf, strndup... 

These functions are compiled in dev-libs/libstrl. 

Reproducible: Always

Steps to Reproduce:
1. ecopy app-admin/logrotate in a local overlay (http://www.gentoo.org/proj/en/gentoo-alt/prefix/ecopy.xml)
2. emerge  app-admin/logrotate
Actual Results:  
Calculating dependencies... done!
[ebuild  N    *] app-admin/logrotate-3.8.0  USE="(-acl) (-selinux)"

The following keyword changes are necessary to proceed:
#required by app-admin/logrotate (argument)
>=app-admin/logrotate-3.8.0 **

NOTE: This --autounmask behavior can be disabled by setting
      EMERGE_DEFAULT_OPTS="--autounmask=n" in make.conf.

Autounmask changes successfully written. Remember to run etc-update.
mxdev01@mxdevsrv:/apps/murex/local/SunOS-sparc/gentoo/usr/local/portage/$ emerge --autounmask-write app-admin/logrotate
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-admin/logrotate-3.8.0 from local-overlay
 * logrotate-3.8.0.tar.gz SHA1 SHA256 size ;-) ...                                                                                                       [ ok ]
>>> Unpacking source...
>>> Unpacking logrotate-3.8.0.tar.gz to /tmp/portage/app-admin/logrotate-3.8.0/work
>>> Source unpacked in /tmp/portage/app-admin/logrotate-3.8.0/work
>>> Preparing source in /tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0 ...
 * Applying logrotate-3.7.7-datehack.patch ...                                                                                                           [ ok ]
 * Applying logrotate-3.8.0-ignore-hidden.patch ...                                                                                                      [ ok ]
 * Applying logrotate-3.8.0-fbsd.patch ...                                                                                                               [ ok ]
 * Applying logrotate-3.8.0-atomic-create.patch ...                                                                                                      [ ok ]
 * Applying logrotate-3.8.0-noasprintf.patch ...                                                                                                         [ ok ]
>>> Source prepared.
>>> Configuring source in /tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0 ...
>>> Source configured.
>>> Compiling source in /tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0 ...
make CC=sparc-sun-solaris2.10-gcc RPM_OPT_FLAGS=
sparc-sun-solaris2.10-gcc -E -M -I/opt/baw/include -D_GNU_SOURCE -DSunOS -DVERSION=\"3.8.0\"  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -M logrotate.c log.c config.c basenames.c  > .depend
sparc-sun-solaris2.10-gcc -I/opt/baw/include -D_GNU_SOURCE -DSunOS -DVERSION=\"3.8.0\"  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -c -o logrotate.o logrotate.c
logrotate.c: In function 'shred_file':
logrotate.c:330: warning: incompatible implicit declaration of built-in function 'alloca'
logrotate.c:333: warning: incompatible implicit declaration of built-in function 'alloca'
logrotate.c: In function 'compressLogFile':
logrotate.c:402: warning: incompatible implicit declaration of built-in function 'alloca'
sparc-sun-solaris2.10-gcc -I/opt/baw/include -D_GNU_SOURCE -DSunOS -DVERSION=\"3.8.0\"  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -c -o log.o log.c
sparc-sun-solaris2.10-gcc -I/opt/baw/include -D_GNU_SOURCE -DSunOS -DVERSION=\"3.8.0\"  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -c -o config.o config.c
config.c: In function 'isolateLine':
config.c:82: warning: incompatible implicit declaration of built-in function 'strndup'
config.c: In function 'isolateWord':
config.c:120: warning: incompatible implicit declaration of built-in function 'strndup'
config.c: In function 'readConfigFile':
config.c:1271: warning: incompatible implicit declaration of built-in function 'strndup'
config.c:1383: warning: incompatible implicit declaration of built-in function 'alloca'
sparc-sun-solaris2.10-gcc -I/opt/baw/include -D_GNU_SOURCE -DSunOS -DVERSION=\"3.8.0\"  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -c -o basenames.o basenames.c
sparc-sun-solaris2.10-gcc -g  logrotate.o log.o config.o basenames.o -lpopt  -o logrotate
logrotate.o: In function `prerotateSingleLog':
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/logrotate.c:980: undefined reference to `asprintf'
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/logrotate.c:989: undefined reference to `asprintf'
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/logrotate.c:1003: undefined reference to `asprintf'
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/logrotate.c:1011: undefined reference to `asprintf'
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/logrotate.c:1030: undefined reference to `asprintf'
logrotate.o:/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/logrotate.c:1070: more undefined references to `asprintf' follow
config.o: In function `isolateLine':
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/config.c:82: undefined reference to `strndup'
config.o: In function `isolateWord':
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/config.c:120: undefined reference to `strndup'
config.o: In function `checkFile':
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/config.c:208: undefined reference to `asprintf'
config.o: In function `readConfigFile':
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/config.c:1271: undefined reference to `strndup'
/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0/config.c:1304: undefined reference to `asprintf'
collect2: ld returned 1 exit status
make: *** [logrotate] Error 1
emake failed
 * ERROR: app-admin/logrotate-3.8.0 failed (compile phase):
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line  62:  Called call-ebuildshell 'src_compile'
 *   environment, line 422:  Called src_compile
 *   environment, line 2610:  Called die
 * The specific snippet of code:
 *       emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}" || die "emake failed"
 *
 * If you need support, post the output of 'emerge --info =app-admin/logrotate-3.8.0',
 * the complete build log and the output of 'emerge -pqv =app-admin/logrotate-3.8.0'.
 * This ebuild is from an overlay named 'local-overlay': '/apps/murex/local/SunOS-sparc/gentoo/usr/local/portage/'
 * The complete build log is located at '/tmp/portage/app-admin/logrotate-3.8.0/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/app-admin/logrotate-3.8.0/temp/environment'.
 * S: '/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0'

>>> Failed to emerge app-admin/logrotate-3.8.0, Log file:

>>>  '/tmp/portage/app-admin/logrotate-3.8.0/temp/build.log'

 * Messages for package app-admin/logrotate-3.8.0:

 * ERROR: app-admin/logrotate-3.8.0 failed (compile phase):
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line  62:  Called call-ebuildshell 'src_compile'
 *   environment, line 422:  Called src_compile
 *   environment, line 2610:  Called die
 * The specific snippet of code:
 *       emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}" || die "emake failed"
 *
 * If you need support, post the output of 'emerge --info =app-admin/logrotate-3.8.0',
 * the complete build log and the output of 'emerge -pqv =app-admin/logrotate-3.8.0'.
 * This ebuild is from an overlay named 'local-overlay': '/apps/murex/local/SunOS-sparc/gentoo/usr/local/portage/'
 * The complete build log is located at '/tmp/portage/app-admin/logrotate-3.8.0/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/app-admin/logrotate-3.8.0/temp/environment'.
 * S: '/tmp/portage/app-admin/logrotate-3.8.0/work/logrotate-3.8.0'


Expected Results:  
The package compiled

I just installed the dev-libs/libstrl library and linked the code with it. I created some spartan patches for the ebuild and files/
Comment 1 Hector Rivas 2011-10-03 18:12:38 UTC
Created attachment 288705 [details]
Patch adding the dependency for dev-libs/libstrl
Comment 2 Hector Rivas 2011-10-03 18:13:57 UTC
Created attachment 288707 [details, diff]
Patch for the code itself, linking to libstrl and adding libiberty.h include
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-10-07 18:55:32 UTC
(In reply to comment #2)
> Created attachment 288707 [details, diff]
> Patch for the code itself, linking to libstrl and adding libiberty.h include

I'd really like to see this go upstream....but we also need to try 3.8.1 first..

1 	3.8.0 -> 3.8.1
...
3 	        - another fixes for Solaris
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-08-10 18:44:10 UTC
> I'd really like to see this go upstream....but we also need to try 3.8.1
> first..

Still true. Please reopen with details (if desired)