RPM

switch ifdef __sun__ to __sun in tools/{rpmfind.c,rpmmtree.c}

Bug #1243472 reported by Tim Mooney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
Fix Released
Medium
Jeff Johnson

Bug Description

building rpm CVS (2013-10-22) on x86_64-pc-solaris2.11 (OpenIndiana 151a8) with Oracle Studio 12.3

I get link failures for both rpmfind and rpmmtree:

libtool: link: cc -m64 -xopenmp -xtarget=generic -m64 -xarch=generic -Xa -xc99=all -KPIC -I/usr/local/include -I/usr/local/gnu/include -KPIC -DPIC -v -xO0 -g -D_GNU_SOURCE -D_REENTRANT -o .libs/find rpmfind.o -L/usr/local/lib/64 -L/usr/local/gnu/lib/64 -L/local/lib/64 -L/usr/lib/amd64 ../rpmio/.libs/librpmio.so -lm ../misc/.libs/librpmmisc.so -L../beecrypt /local/gnu/lib/64/libintl.so -lpcreposix -lreadline /local/lib/64/libdb_sql-5.1.so /local/lib/64/libdb-5.1.so -lresolv /local/lib/64/liblzma.so -lbz2 -lpthread -lelf /local/lib/64/libpopt.so /local/lib/64/libneon.so -lz -lssl -lcrypto -lsocket -lnsl -lc -lproxy -lexpat -lpcre -mt -xopenmp -R/usr/local/lib/64 -R/local/gnu/lib/64 -R/local/lib/64 -R/usr/local/gnu/lib/64
cc: Warning: Optimizer level changed from 0 to 3 to support parallelized code.
ld: warning: symbol 'aes' has differing types:
 (file ../rpmio/.libs/librpmio.so type=FUNC; file ../misc/.libs/librpmmisc.so type=OBJT);
 ../rpmio/.libs/librpmio.so definition taken
Undefined first referenced
 symbol in file
strtoq rpmfind.o
rpmatch rpmfind.o
setmode rpmfind.o
getmode rpmfind.o
ld: fatal: symbol referencing errors. No output written to .libs/find
gmake[1]: *** [find] Error 2
gmake[1]: Leaving directory `/local/src/RPM/SOURCES/rpm-20131016/rpm/tools'

Both files actually have code to handle functions that might be missing, the only problem is that the ifdef guard is looking for

  defined(__sun__)

which is (I believe) specific to gcc on Solaris. I think that __sun will work with both gcc and Studio, so switching the ifdef tests to use that allows both files to compile without issue.

Tags: solaris
Revision history for this message
Tim Mooney (tim-mooney) wrote :
Revision history for this message
Jeff Johnson (n3npq) wrote :

Every grrl just gotta be different, sigh. Applied, thanks!

Changed in rpm:
assignee: nobody → Jeff Johnson (n3npq)
milestone: none → 5.4.13
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Tim Mooney (tim-mooney) wrote :

Thanks Jeff!

By any chance, am I using an incorrect branch from CVS to provide my patches? I followed the instructions for retrieving the CVS sources from

   http://rpm5.org/sources.php

but for some reason I'm not seeing the fixes you've committed show up when I "cvs update". It's been a while since I've used CVS, so I just want to be certain I've working against the CVS branch you would prefer me to work against.

Revision history for this message
devzero2000 (pinto-elia) wrote : Re: [Bug 1243472] Re: switch ifdef __sun__ to __sun in tools/{rpmfind.c, rpmmtree.c}

Search the branch rpm 5.4

On Wed, Oct 23, 2013 at 9:02 PM, Tim Mooney <email address hidden> wrote:
> Thanks Jeff!
>
> By any chance, am I using an incorrect branch from CVS to provide my
> patches? I followed the instructions for retrieving the CVS sources
> from
>
> http://rpm5.org/sources.php
>
> but for some reason I'm not seeing the fixes you've committed show up
> when I "cvs update". It's been a while since I've used CVS, so I just
> want to be certain I've working against the CVS branch you would prefer
> me to work against.
>
> --
> You received this bug notification because you are subscribed to RPM.
> https://bugs.launchpad.net/bugs/1243472
>
> Title:
> switch ifdef __sun__ to __sun in tools/{rpmfind.c,rpmmtree.c}
>
> Status in rpm package manager:
> Fix Committed
>
> Bug description:
> building rpm CVS (2013-10-22) on x86_64-pc-solaris2.11 (OpenIndiana
> 151a8) with Oracle Studio 12.3
>
> I get link failures for both rpmfind and rpmmtree:
>
> libtool: link: cc -m64 -xopenmp -xtarget=generic -m64 -xarch=generic -Xa -xc99=all -KPIC -I/usr/local/include -I/usr/local/gnu/include -KPIC -DPIC -v -xO0 -g -D_GNU_SOURCE -D_REENTRANT -o .libs/find rpmfind.o -L/usr/local/lib/64 -L/usr/local/gnu/lib/64 -L/local/lib/64 -L/usr/lib/amd64 ../rpmio/.libs/librpmio.so -lm ../misc/.libs/librpmmisc.so -L../beecrypt /local/gnu/lib/64/libintl.so -lpcreposix -lreadline /local/lib/64/libdb_sql-5.1.so /local/lib/64/libdb-5.1.so -lresolv /local/lib/64/liblzma.so -lbz2 -lpthread -lelf /local/lib/64/libpopt.so /local/lib/64/libneon.so -lz -lssl -lcrypto -lsocket -lnsl -lc -lproxy -lexpat -lpcre -mt -xopenmp -R/usr/local/lib/64 -R/local/gnu/lib/64 -R/local/lib/64 -R/usr/local/gnu/lib/64
> cc: Warning: Optimizer level changed from 0 to 3 to support parallelized code.
> ld: warning: symbol 'aes' has differing types:
> (file ../rpmio/.libs/librpmio.so type=FUNC; file ../misc/.libs/librpmmisc.so type=OBJT);
> ../rpmio/.libs/librpmio.so definition taken
> Undefined first referenced
> symbol in file
> strtoq rpmfind.o
> rpmatch rpmfind.o
> setmode rpmfind.o
> getmode rpmfind.o
> ld: fatal: symbol referencing errors. No output written to .libs/find
> gmake[1]: *** [find] Error 2
> gmake[1]: Leaving directory `/local/src/RPM/SOURCES/rpm-20131016/rpm/tools'
>
> Both files actually have code to handle functions that might be
> missing, the only problem is that the ifdef guard is looking for
>
> defined(__sun__)
>
> which is (I believe) specific to gcc on Solaris. I think that __sun
> will work with both gcc and Studio, so switching the ifdef tests to
> use that allows both files to compile without issue.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/rpm/+bug/1243472/+subscriptions

Jeff Johnson (n3npq)
Changed in rpm:
milestone: 5.4.13 → 5.4.14
Jeff Johnson (n3npq)
Changed in rpm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.