Unable to compile HxCFloppyEmulator on Linux

General discussion forum - for all that doesn't fit in any other category.
Post Reply
abbalah
Posts: 11
Joined: Mon Apr 29, 2013 10:24 pm

Unable to compile HxCFloppyEmulator on Linux

Post by abbalah »

I'm running 64 bit Fedora 18 on my computer. Unfortunately I can't figure out what's needed to successfully compile the HxCFloppyEmulator software for Linux
and I can't find any instructions. Any advice or documentation would be handy.

I've fetched the source from the SourceForge repository:

Code: Select all

svn co https://hxcfloppyemu.svn.sourceforge.net/svnroot/hxcfloppyemu hxcfloppyemu 
I run make under /hxcfloppyemu/HxCFloppyEmulator/build. which terminates with an error:

Code: Select all

gcc -o libhxcfe.so    floppy_loader.o floppy_utils.o floppy_ifmode.o emuii_track.o crc.o track_generator.o gcr_track.o sector_extractor.o display_track.o fs_manager.o fs_fat12.o adf_hd.o adf_disk.o adf_raw.o adf_bitm.o adf_dump.o adf_util.o adf_env.o adf_nativ.o adf_dir.o adf_file.o adf_cache.o adf_link.o adf_salv.o copyqm_loader.o crctable.o adf_loader.o adz_loader.o amigadosfs_loader.o vfile.o cpcdsk_loader.o msa_loader.o msx_loader.o smc_loader.o st_loader.o stx_loader.o img_loader.o dms_loader.o mfm_loader.o oricdsk_loader.o d64_loader.o trd_loader.o scl_loader.o fat12floppy_loader.o fat12.o hfe_loader.o imd_loader.o afi_loader.o sap_loader.o libsap.o jv1_loader.o vtr_loader.o d88_loader.o hdm_loader.o ti99pc99_loader.o apridisk_loader.o ede_loader.o fd_loader.o vdk_loader.o dpx_loader.o mgt_loader.o emax_loader.o ensoniq_mirage_loader.o sad_loader.o jv3_loader.o stt_loader.o prophet_loader.o teledisk_loader.o td0_lzss.o emuii_raw_loader.o emuii_loader.o emui_raw_loader.o jvc_loader.o dim_loader.o ti99v9t9_loader.o d81_loader.o acornadf_loader.o camputerslynxldf_loader.o vegasdsk_loader.o dmk_loader.o oldextadf_loader.o extadf_loader.o fdi_loader.o ssd_dsd_loader.o adl_loader.o krz_loader.o w30_loader.o fei_loader.o svd_loader.o gkh_loader.o imz_loader.o raw_loader.o system24_loader.o kryofluxstream_loader.o kryofluxstream.o fzf_loader.o apple2_nib_loader.o sdd_speccydos_loader.o cpcdsk_writer.o mfm_writer.o hfe_writer.o raw_writer.o afi_writer.o exthfe_writer.o imd_writer.o vtr_writer.o ti99v9t9_writer.o getbits.o crc_csum.o maketbl.o pfile.o tables.o u_deep.o u_heavy.o u_init.o u_medium.o u_quick.o u_rle.o adler32.o compress.o crc32.o deflate.o gzlib.o gzread.o gzwrite.o gzclose.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o ioapi.o mztools.o unzip.o zip.o xml_disk.o lzw.o pack.o rle.o xmlparse.o xmlrole.o xmltok.o fat_access.o fat_cache.o fat_filelib.o fat_format.o fat_misc.o fat_string.o fat_table.o fat_write.o ../../../build/libhxcadaptor.a -g -shared -lc -lm  -ldl
/usr/bin/ld: floppy_loader.o: relocation R_X86_64_32S against `dummy_output' can not be used when making a shared object; recompile with -fPIC
floppy_loader.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [libhxcfe.so] Error 1
I've tried adding CFLAGS=-fPIC to the Makefile and specifying it as a parameter on the command line.

Anything else I could try? Any comments from someone who's been able to compile it under Linux?

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Unable to compile HxCFloppyEmulator on Linux

Post by Jeff »

Never got this issue.

Are you trying to mix 32/64 bits libraries ?

abbalah
Posts: 11
Joined: Mon Apr 29, 2013 10:24 pm

Re: Unable to compile HxCFloppyEmulator on Linux

Post by abbalah »

I'm not intentionally mixing libraries from different architectures. I'm basically running stock Fedora 18 with the development tools installed.

Something must be wrong with how the HxCFloppyEmulator is being built for my 64 bit Fedora installation.

I managed to build HxCFloppyEmulator when I created a 32 bit Debian virtual machine with XFCE 4 and build essentials.

The additional steps I took was getting the sources for FLTK and installing libx11-dev.

I will try to investigate this further, but if anyone has managed building HxCFloppyEmulator for Fedora (or even any 64 bit Linux)
any hints would be helpful.

abbalah
Posts: 11
Joined: Mon Apr 29, 2013 10:24 pm

Re: Unable to compile HxCFloppyEmulator on Linux

Post by abbalah »

I created another virtual machine, this time a 64 bit Debian Wheezy. Same packages installed as the 32 bit
virtual machine that I was able to compile on.

The build terminated with the same error message as on my 64 bit Fedora 18.

Can anyone confirm if it should be possible to build the HxCFloppyEmulator in a 64 bit Linux environment?

Any steps aside from just issuing "make" required?

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Unable to compile HxCFloppyEmulator on Linux

Post by Jeff »

maybe a function pointer problem. Can you try to remove the usage of the dummy print function in the source code ?

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Unable to compile HxCFloppyEmulator on Linux

Post by Jeff »

Some interesting stuff.
http://www.gentoo.org/proj/en/base/amd6 ... t=1&chap=3

Will apply this.

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Unable to compile HxCFloppyEmulator on Linux

Post by Jeff »

Makefiles updated. Please do an svn update and do a "make" into the build folder.
Tell me if all is ok.

abbalah
Posts: 11
Joined: Mon Apr 29, 2013 10:24 pm

Re: Unable to compile HxCFloppyEmulator on Linux

Post by abbalah »

Excellent stuff! This fixed the build problems.

Thank you very much.

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Unable to compile HxCFloppyEmulator on Linux

Post by Jeff »

abbalah wrote:Excellent stuff! This fixed the build problems.

Thank you very much.
Ok perfect ! Thanks for the feedback !

Post Reply