Bug 132822 - Compile error on Alpha
Summary: Compile error on Alpha
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libselinux (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-17 14:22 UTC by Oliver Falk
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

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


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

Description Oliver Falk 2004-09-17 14:22:13 UTC
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 15:03:00 UTC
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 15:09:05 UTC
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 20:13:59 UTC
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 07:47:42 UTC
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 07:51:35 UTC
Stephen... The patch you sent works and fixes the warning... Thanks!

Comment 6 Oliver Falk 2004-09-22 07:40:41 UTC
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 07:49:52 UTC
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 08:19:35 UTC
Created attachment 104113 [details]
libselinux spec file with alpha patch file patch

Comment 9 Oliver Falk 2004-09-22 08:20:24 UTC
Created attachment 104114 [details]
libselinux dso.h.apache.patch to fix compile error

Comment 10 Oliver Falk 2004-09-22 08:21:53 UTC
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.