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:
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.
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?
You'll have to show what the assembler code is and which version of binutils and gcc you are using.
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. :-)
Stephen... The patch you sent works and fixes the warning... Thanks!
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
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
Created attachment 104113 [details] libselinux spec file with alpha patch file patch
Created attachment 104114 [details] libselinux dso.h.apache.patch to fix compile error
With the patch from Ulrich it compiles now. Thanks a lot for the help!