Red Hat Bugzilla – Bug 138923
gcc problem compiling samba-3.0.8
Last modified: 2007-11-30 17:10:54 EST
Description of problem:
I am having problems compiling samba-3.0.8 on fedora core 3 64 bit. The
error message I am getting is:
/tmp/ccY0PMTp.s: Assembler messages:
/tmp/ccY0PMTp.s:44: Error: suffix or operands invalid for `mov'
/tmp/ccY0PMTp.s:97: Error: suffix or operands invalid for `mov'
make: *** [dynconfig.o] Error 1
Version-Release number of selected component (if applicable):
gcc version -->gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Samba --> samba-3.0.8
Steps to Reproduce:
1.download samba-3.0.8 from samba.org
2.ungzip and tarball tar -xvf
3.config with ./configure --with-winbind --with-pam --with-smbmount
4. type make
5. in seconds up comes the error
[root@mercyrouter source]# make
Using FLAGS = -O -I/usr/local/cups/include -Iinclude
ba-3.0.8/source/smbwrapper -I. -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/src/samba-3.0.8/source
LIBS = -lcrypt -lnsl -ldl
LDSHFLAGS = -shared -Wl,-Bsymbolic
LDFLAGS = -Wl,-rpath,/usr/local/cups/lib -L/usr/local/cups/lib
/tmp/ccCFZ026.s: Assembler messages:
/tmp/ccCFZ026.s:44: Error: suffix or operands invalid for `mov'
/tmp/ccCFZ026.s:97: Error: suffix or operands invalid for `mov'
make: *** [dynconfig.o] Error 1
1) do you really mean ia64? There is no FC3/ia64, it would need to be either Fedora development tree or you mean FC3/x86-64
2) samba 3.0.8 builds just fine here, on all arches
Can you please convince samba in your build that it instead of printing
Compiling dynconfig.c prints the full gcc command line used to compile that
file and attach here preprocessed dynconfig.i (add -save-temps to the gcc options and rerun)?
Very likely this is a configuration problem and you are using say i386 inline
asm in x86-64 build or something like that.
I'm seeing the same thing on my FC3 x86_64 (Intel EMT64)
Wether i choose to build samba from source or src.rpm i get this
problem. I've tried with gcc(3.4.2-6.fc3) gcc33(3.3.4-2),
gcc4(4.0.0-0.8) and the results are the same...
it looks as if the as assembler chokes on the assembly that gcc
generates for the dynconfig.c file.
Take a look at the attached files
seems like the most probable source of problems is with the as
assembler interpreting the code.
Created attachment 106801 [details]
the error as shown by make on a vanilla samba (-save-temps added)
Created attachment 106802 [details]
the asm code that as chokes on
Can you attach dynconfig.i too?
My guess is this is a samba bug, my guess is it is using something like:
asm volatile ("movl %0, %eax; ..." : : "r" (ptr) ...);
which is obviously incorrect for x86-64 (ptr is 64-bit, so you end up with
movl %rsi, %eax in the assembly you attached, but that is incorrect instruction).
my initial thought was that the binutils package included in FC3 was
somehow corrupt for x86_64. I tried to update it to latest development
release with no luck. I've tried to downgrade it to FC2 level (never
tried FC2 on x86_64 so i'm not sure if that should work) with no luck.
this is what i've seen! Hope you guys can make som sense out of all of
Created attachment 106803 [details]
i don't believe this is a samba bug... i've already discussed this
with samba team and they rebuilt it (from source) with no problem on
(on x86_64 as well of course)
logs are available here
Ok, this seems like a bug in samba and valgrind.
Samba stupidly includes valgrind.h whenever that header exists (it should include
it only when --enable-developer when it is going to use it, as already including
that header means compiling some code in each .c file that #includes valgrind.h.
And the bug on valgrind side is that it should probably act as if NVALGRIND is
defined if not compiling 32-bit code.
I'll try to do some testing later on, removing tha valgrind header and
see if that changes anything! I may not be able to get around to it
until tomorrow but i'll keep you posted!
removing valgrind and retrying does the trick!
valgrind-2.2.0-6 should show up in rawhide today.
installed latest version of valgrind and rebuilt samba. Problem is solved!
Thanks a lot!
I also cannot recompile samba on FC3 x86_64, could you please issue an upgrade
to valgrind for FC3?