Re: opencbm 0.4.0 on recent Linux kernels?

silverdr_at_inet.com.pl
Date: 2006-07-01 22:52:42

On 2006-06-22, at 11:04, Spiro Trikaliotis wrote:

> Hello Tim,
>
> * On Thu, Jun 22, 2006 at 10:05:03AM +0200 Tim Schürmann wrote:
>
>> AFAIR there was a discussion in the (german) Forum64 about gcc 4.x vs
>> gcc 3.x?
>
> AS the poster there did not tell about his problems in details, it was
> just one thought that it might be related.
>
> So far, there is not even a smallest evidence for an incompatibility
> with a specific version of gcc. I am waiting for more information from
> the poster there.

I eventually got a couple of minutes to check it again. The machine  
in question is AMD_64 CPU equipped if that changes something.

The error was:

gcc -shared -o libopencbm.so.0.4.0 -Wl,-soname -Wl,libopencbm.so.0
cbm.lo detect.lo detectxp1541.lo petscii.lo upload.lo LINUX/archlib.lo
LINUX/archmnib.lo ../libcbmcopy/cbmcopy.lo ../libcbmcopy/pp.lo ../ 
libcbmcopy/s1.lo ../libcbmcopy/s2.lo ../libd64copy/d64copy.lo ../ 
libd64copy/fs.lo ../libd64copy/gcr.lo ../libd64copy/pp.lo ../ 
libd64copy/s1.lo ../libd64copy/s2.lo ../libd64copy/std.lo ../arch/ 
linux//libarch.a
/usr/bin/ld: ../arch/linux//libarch.a(file.o): relocation R_X86_64_PC32
against `__xstat@@GLIBC_2.2.5' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

Thus I checked the relevant Makefiles and the included "config" file.  
Eventually I changed the 'arch/linux/LINUX/Makefile':

-         $(CC) $(LIB_CFLAGS) -c -o $@ $<
+         $(CC) $(SHLIB_CFLAGS) -c -o $@ $<

and it seemed to help the linker. The next problem was that at the  
end make complained about non-existent mnib36 but I commented-out the  
SUBDIRS_OPTIONAL line in the main Makefile to finish the build  
without errors.

-- 
MSDOS: Mistrzowski Sposób Dobijania Operatorów Sprzętu




       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.