This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 132822 - Compile error on Alpha
Compile error on Alpha
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-17 10:22 EDT by Oliver Falk
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-21 15:06:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Fix cast of pointer to integer of different size (777 bytes, patch)
2004-09-17 11:03 EDT, Stephen Smalley
no flags Details | Diff
libselinux spec file with alpha patch file patch (583 bytes, patch)
2004-09-22 04:19 EDT, Oliver Falk
no flags Details | Diff
libselinux dso.h.apache.patch to fix compile error (570 bytes, patch)
2004-09-22 04:20 EDT, Oliver Falk
no flags Details | Diff

  None (edit)
Description Oliver Falk 2004-09-17 10:22:13 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Description of problem:
I guess it's not an rpm specific error, but you may have an idea!?

cc -O2 -g -mieee -I../include -D_GNU_SOURCE -fpic -DSHARED -c -o
avc.lo avc.c
avc.c: In function `avc_hash':
avc.c:213: warning: cast from pointer to integer of different size
avc.c:213: warning: cast from pointer to integer of different size
/tmp/ccLyvT0e.s: Assembler messages:
/tmp/ccLyvT0e.s:15: Warning: Tried to .set unrecognized mode
`avc_av_stats'
/tmp/ccLyvT0e.s:15: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccLyvT0e.s:17: Warning: Tried to .set unrecognized mode `avc_cleanup'
/tmp/ccLyvT0e.s:17: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccLyvT0e.s:19: Warning: Tried to .set unrecognized mode `avc_reset'
/tmp/ccLyvT0e.s:19: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccLyvT0e.s:21: Warning: Tried to .set unrecognized mode `avc_audit'
/tmp/ccLyvT0e.s:21: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccLyvT0e.s:23: Warning: Tried to .set unrecognized mode
`avc_has_perm_noaudit'
/tmp/ccLyvT0e.s:23: Error: junk at end of line, first unrecognized
character is `,'
make[1]: *** [avc.lo] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/libselinux-1.17.12/src'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7893 (%build)

Version-Release number of selected component (if applicable):
1.17.12

How reproducible:
Always

Steps to Reproduce:
Rebuild it on Fedora Core 2 on Alpha platform.

Additional info:
Comment 1 Stephen Smalley 2004-09-17 11:03:00 EDT
Created attachment 103949 [details]
Fix cast of pointer to integer of different size

This patch should fix the warning about the pointer cast.
I have no clue about the subsequent assembler messages.
Comment 2 Stephen Smalley 2004-09-17 11:09:05 EDT
Ok, looking more closely, I see that the .set directives are coming
from the hidden_def() macro defined in dso.h and used in avc.c. 
That code came from Ulrich Drepper as part of his optimizing libselinux
patches, so maybe he knows why it doesn't work on alpha?
Comment 3 Ulrich Drepper 2004-09-17 16:13:59 EDT
You'll have to show what the assembler code is and which version of
binutils and gcc you are using.
Comment 4 Oliver Falk 2004-09-20 03:47:42 EDT
Versions:

[root@blue BUILD]# rpm -q binutils gcc
binutils-2.15.91.0.2-8
gcc-3.4.1-10

It this part that seems to fail compiling:
#ifdef SHARED
# define hidden __attribute__ ((visibility ("hidden")))
# define hidden_proto(fct) __hidden_proto (fct, fct##_internal)
# define __hidden_proto(fct, internal)  \
     extern __typeof (fct) internal;    \
     extern __typeof (fct) fct __asm (#internal) hidden;
# define hidden_def(fct) \
     asm (".globl " #fct "\n.set " #fct ", " #fct "_internal");
#else
# define hidden
# define hidden_proto(fct)
# define hidden_def(fct)
#endif

If try compiling avc.c without -DSHARED, it works, but this is not a
solution as you can guess. :-)
Comment 5 Oliver Falk 2004-09-20 03:51:35 EDT
Stephen... The patch you sent works and fixes the warning... Thanks!
Comment 6 Oliver Falk 2004-09-22 03:40:41 EDT
Still the same error with 1.17.13-1:
cc -O2 -g -mieee -I../include -D_GNU_SOURCE -fpic -DSHARED -c -o
avc.lo avc.c
/tmp/ccFWZQtr.s: Assembler messages:
/tmp/ccFWZQtr.s:15: Warning: Tried to .set unrecognized mode
`avc_av_stats'
/tmp/ccFWZQtr.s:15: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccFWZQtr.s:17: Warning: Tried to .set unrecognized mode `avc_cleanup'
/tmp/ccFWZQtr.s:17: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccFWZQtr.s:19: Warning: Tried to .set unrecognized mode `avc_reset'
/tmp/ccFWZQtr.s:19: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccFWZQtr.s:21: Warning: Tried to .set unrecognized mode `avc_audit'
/tmp/ccFWZQtr.s:21: Error: junk at end of line, first unrecognized
character is `,'
/tmp/ccFWZQtr.s:23: Warning: Tried to .set unrecognized mode
`avc_has_perm_noaudit'
/tmp/ccFWZQtr.s:23: Error: junk at end of line, first unrecognized
character is `,'
make[1]: *** [avc.lo] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/libselinux-1.17.13/src'
make: *** [all] Error 2
Comment 7 Ulrich Drepper 2004-09-22 03:49:52 EDT
Try using

# ifdef __alpha__
#  define hidden_def(fct) \
     asm (".globl " #fct "\n" #fct " = " #fct "_internal");
# else
#  define hidden_def(fct) \
     asm (".globl " #fct "\n.set " #fct ", " #fct "_internal");
#endif
Comment 8 Oliver Falk 2004-09-22 04:19:35 EDT
Created attachment 104113 [details]
libselinux spec file with alpha patch file patch
Comment 9 Oliver Falk 2004-09-22 04:20:24 EDT
Created attachment 104114 [details]
libselinux dso.h.apache.patch to fix compile error
Comment 10 Oliver Falk 2004-09-22 04:21:53 EDT
With the patch from Ulrich it compiles now. Thanks a lot for the help!

Note You need to log in before you can comment on or make changes to this bug.