Trouble Compiling Emulator Software on Raspberry Pi Zero

General discussion forum - for all that doesn't fit in any other category.
Post Reply
Ttz0019
Posts: 12
Joined: Tue May 21, 2019 11:03 pm

Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Ttz0019 » Thu Jun 27, 2019 6:23 pm

Hey Y'all, I've tried my best to follow instructions on compiling the Floppy Emulator for raspberry pi, and have made progress with several dependencies and the like. But I keep running into a fatal error in which I am missing the 'libhxcfe.h' file. I've followed the filepath and found the 'hxcfe.c' file, but obviously that is different. I'll attach the console text below. Has anyone seen this and know how to fix it?

Thanks
------------------------

pi@raspberrypi:~/Downloads/HxC/slim/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build $ make
g++ -o main.o -c ../sources/main.cxx -O3 -I ../sources -I ../../../libhxcfe/trunk/sources -I ../sources/ -I ../sources/gui -I ../sources/thirdpartylibs/fltk/fltk-1.3.x/ -I ../../../libusbhxcfe/trunk/sources -I ../../../libhxcadaptor/trunk/sources -I ../sources/gui/microintro/ -Wall
../sources/main.cxx:50:22: fatal error: libhxcfe.h: No such file or directory
#include "libhxcfe.h"
^
compilation terminated.
Makefile:69: recipe for target 'main.o' failed
make: *** [main.o] Error 1

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

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Jeff » Mon Jul 01, 2019 7:48 am

Ttz0019 wrote:
Thu Jun 27, 2019 6:23 pm
Hey Y'all, I've tried my best to follow instructions on compiling the Floppy Emulator for raspberry pi, and have made progress with several dependencies and the like. But I keep running into a fatal error in which I am missing the 'libhxcfe.h' file. I've followed the filepath and found the 'hxcfe.c' file, but obviously that is different. I'll attach the console text below. Has anyone seen this and know how to fix it?

Thanks
------------------------

pi@raspberrypi:~/Downloads/HxC/slim/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build $ make
g++ -o main.o -c ../sources/main.cxx -O3 -I ../sources -I ../../../libhxcfe/trunk/sources -I ../sources/ -I ../sources/gui -I ../sources/thirdpartylibs/fltk/fltk-1.3.x/ -I ../../../libusbhxcfe/trunk/sources -I ../../../libhxcadaptor/trunk/sources -I ../sources/gui/microintro/ -Wall
../sources/main.cxx:50:22: fatal error: libhxcfe.h: No such file or directory
#include "libhxcfe.h"
^
compilation terminated.
Makefile:69: recipe for target 'main.o' failed
make: *** [main.o] Error 1
go to the "/Downloads/HxC/slim/HxCFloppyEmulator/build" folder and launch a "make"

Ttz0019
Posts: 12
Joined: Tue May 21, 2019 11:03 pm

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Ttz0019 » Mon Jul 01, 2019 6:26 pm

Launching make from that directory results in the following error:

-----

pi@raspberrypi:~/Downloads/HxC/slim/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build $ make
g++ -o main.o -c ../sources/main.cxx -O3 -I ../sources -I ../../../libhxcfe/trunk/sources -I ../sources/ -I ../sources/gui -I ../sources/thirdpartylibs/fltk/fltk-1.3.x/ -I ../../../libusbhxcfe/trunk/sources -I ../../../libhxcadaptor/trunk/sources -I ../sources/gui/microintro/ -Wall
../sources/main.cxx:50:22: fatal error: libhxcfe.h: No such file or directory
#include "libhxcfe.h"
^
compilation terminated.
Makefile:69: recipe for target 'main.o' failed
make: *** [main.o] Error 1

Ttz0019
Posts: 12
Joined: Tue May 21, 2019 11:03 pm

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Ttz0019 » Mon Jul 01, 2019 7:48 pm

I reread my reply and realized I had copied the wrong command and output. Here's the correct one.

------------------------

pi@raspberrypi:~/Downloads/HxC/slim/HxCFloppyEmulator/build $ make
make -C ../libhxcadaptor/trunk/build/
make[1]: Entering directory '/home/pi/Downloads/HxC/slim/HxCFloppyEmulator/libhxcadaptor/trunk/build'
gcc -o libhxcadaptor.o -c ../sources/libhxcadaptor.c -O3 -I../sources/ -I ../../../libhxcfe/trunk/sources -I ../../../libusbhxcfe/trunk/sources -Wall -fPIC -Wl,-Map,foo.map
../sources/libhxcadaptor.c:69:31: fatal error: internal_libhxcfe.h: No such file or directory
#include "internal_libhxcfe.h"
^
compilation terminated.
Makefile:38: recipe for target 'libhxcadaptor.o' failed
make[1]: *** [libhxcadaptor.o] Error 1
make[1]: Leaving directory '/home/pi/Downloads/HxC/slim/HxCFloppyEmulator/libhxcadaptor/trunk/build'
Makefile:4: recipe for target 'libhxcadaptor' failed
make: *** [libhxcadaptor] Error 2

Ttz0019
Posts: 12
Joined: Tue May 21, 2019 11:03 pm

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Ttz0019 » Mon Jul 01, 2019 10:19 pm

Well, I think I finally made a breakthrough. After struggling for far longer than I care to admit, I ended up deleting the files and starting from scratch. Maybe it had to do with how I downloaded my files on my laptop and transferred them on a flash drive, but this time I used the subversion checkout function and it seems to be compiling past the initial steps at least.

We can delete this thread or leave it up in case someone else has this issue. Thanks for your patience.

Ttz0019
Posts: 12
Joined: Tue May 21, 2019 11:03 pm

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Ttz0019 » Fri Jul 12, 2019 3:53 pm

Might as well tack this on here if you don't mind. Can I use the Linux command line to convert all the contents of an .hfe file? I'm pretty new to raspberry pi, linux, and python, but the wildcard "*" doesn't allow me to manipulate files like I can with a cp, mv, or rm command. Will I need to save the output of "./ hxcfe -list" into a string, manipulate out all of the file names, and run "-getfile" for each?

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

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Jeff » Thu Jul 18, 2019 1:09 pm

Ttz0019 wrote:
Fri Jul 12, 2019 3:53 pm
Might as well tack this on here if you don't mind. Can I use the Linux command line to convert all the contents of an .hfe file? I'm pretty new to raspberry pi, linux, and python, but the wildcard "*" doesn't allow me to manipulate files like I can with a cp, mv, or rm command. Will I need to save the output of "./ hxcfe -list" into a string, manipulate out all of the file names, and run "-getfile" for each?
What do you want to do exactly ?

Henry89it
Posts: 5
Joined: Wed Jul 31, 2019 9:11 am

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Henry89it » Wed Jul 31, 2019 11:59 am

Hi Jeff,

I am trying to compile the HxCFloppyDriveEmulator on a RaspberryPI 3+ B, with a common Raspbian (NOOBS).

I have followed the instruction by http://www.torlus.com/floppy/forum/view ... fltk#p9639, I installed also the fltk-1.3.2 but had a problem with the libusbhxcfe library, in particular with the LZ4 library: while making it, I find the following error:

make[1]: ingresso nella directory "/home/pi/Downloads/HxC/slim/hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_cmdline/trunk/build"
gcc -o hxcfe hxcfe.o utils.o ../../../build/libhxcadaptor.a libhxcfe.so libusbhxcfe.so -lc -lm -ldl -lpthread -s -Wl,-rpath=. -Wl,-Map,foo.map
/usr/bin/ld: libhxcfe.so: undefined reference to `LZ4_compressBound'
/usr/bin/ld: libhxcfe.so: undefined reference to `LZ4_decompress_safe'
/usr/bin/ld: libhxcfe.so: undefined reference to `LZ4_compress_default'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:42: hxcfe] Error 1

I looked for these functions in the LZ4 library, and I found them.

What can I do?

Thank you

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

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Jeff » Wed Jul 31, 2019 1:49 pm

Henry89it wrote:
Wed Jul 31, 2019 11:59 am
Hi Jeff,

I am trying to compile the HxCFloppyDriveEmulator on a RaspberryPI 3+ B, with a common Raspbian (NOOBS).

I have followed the instruction by http://www.torlus.com/floppy/forum/view ... fltk#p9639, I installed also the fltk-1.3.2 but had a problem with the libusbhxcfe library, in particular with the LZ4 library: while making it, I find the following error:

make[1]: ingresso nella directory "/home/pi/Downloads/HxC/slim/hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_cmdline/trunk/build"
gcc -o hxcfe hxcfe.o utils.o ../../../build/libhxcadaptor.a libhxcfe.so libusbhxcfe.so -lc -lm -ldl -lpthread -s -Wl,-rpath=. -Wl,-Map,foo.map
/usr/bin/ld: libhxcfe.so: undefined reference to `LZ4_compressBound'
/usr/bin/ld: libhxcfe.so: undefined reference to `LZ4_decompress_safe'
/usr/bin/ld: libhxcfe.so: undefined reference to `LZ4_compress_default'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:42: hxcfe] Error 1

I looked for these functions in the LZ4 library, and I found them.

What can I do?

Thank you
Update and retry. I forgot to commit some stuff recently.

Henry89it
Posts: 5
Joined: Wed Jul 31, 2019 9:11 am

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Henry89it » Wed Jul 31, 2019 3:06 pm

Thank you Jeff, now I can compile that libraries.

I have still a problem with the fltk-1.3.2. The library compiles properly but when trying making the trunk:
make[2]: uscita dalla directory "/home/pi/Downloads/HxC/slim/hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/sources/thirdpartylibs/fltk/fltk-1.3.x/documentation"
make[1]: uscita dalla directory "/home/pi/Downloads/HxC/slim/hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/sources/thirdpartylibs/fltk/fltk-1.3.x"
make -C ../HxCFloppyEmulator_software/trunk/build/
make[1]: ingresso nella directory "/home/pi/Downloads/HxC/slim/hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build"
g++ -o hxcfloppyemulator main.o utils.o main_gui.o msg_txt.o about_gui.o batch_converter_window.o floppy_dump_window.o floppy_infos_window.o license_gui.o log.o rawfile_loader_window.o sdhxcfecfg_window.o usbhxcfecfg_window.o cb_batch_converter_window.o cb_floppy_dump_window.o cb_floppy_infos_window.o cb_rawfile_loader_window.o cb_sdhxcfecfg_window.o cb_usbhxcfecfg_window.o cb_filesystem_generator_window.o filesystem_generator_window.o cb_edittool_window.o edittool_window.o microintro.o lzw.o pack.o rle.o hxcmod.o loader.o soft_cfg_file.o fileselector.o ../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a ../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk_images.a libhxcfe.so libusbhxcfe.so ../../../build/libhxcadaptor.a -lc -lm -ldl -lpthread -s -Wl,-rpath=. -Wl,-Map,foo.map -lX11 -lXext -lXfixes
/usr/bin/ld: main_gui.o: in function `Main_Window::Main_Window()':
main_gui.cxx:(.text+0x126c): undefined reference to `Fl_RGB_Image::Fl_RGB_Image(unsigned char const*, int, int, int, int)'
/usr/bin/ld: ../sources/thirdpartylibs/fltk/fltk-1.3.x/lib/libfltk.a(screen_xywh.o): in function `screen_init()':
screen_xywh.cxx:(.text+0x1c): undefined reference to `XineramaIsActive'
/usr/bin/ld: screen_xywh.cxx:(.text+0x34): undefined reference to `XineramaQueryScreens'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:59: hxcfloppyemulator] Error 1
make[1]: uscita dalla directory "/home/pi/Downloads/HxC/slim/hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build"
make: *** [Makefile:19: HxCFloppyEmulator_software] Error 2


It seems that the library is not properly linked.

Do you suggest some hint?

Thank you

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

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Jeff » Wed Jul 31, 2019 3:14 pm

Some answers :

https://stackoverflow.com/questions/294 ... on-ubuntug

You probably need to follow the above advices to compile it for your system.

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

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Jeff » Wed Jul 31, 2019 3:16 pm

and this modification too :
sed -i 's/-lX11/-lX11 -lXext -lXfixes -lXext -lXfixes -lXft -lfontconfig -lXcursor -lXrender -lXinerama/' hxcfloppyemu-code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build/Makefile

Henry89it
Posts: 5
Joined: Wed Jul 31, 2019 9:11 am

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Henry89it » Wed Jul 31, 2019 4:15 pm

With

sed -i 's/-lX11/-lX11 -lXext -lXfixes -lXext -lXfixes -lXft -lfontconfig -lXcursor -lXrender -lXinerama -lXi /' Makefile

the build was successful!

Many Thanks.

Ttz0019
Posts: 12
Joined: Tue May 21, 2019 11:03 pm

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Ttz0019 » Wed Jul 31, 2019 5:38 pm

I have an unknown number of utf-8 encoded documents with standardized file names but varied extensions (for some reason) in an .hfe file. I want to extract all of these documents to a folder and empty the .hfe to make room for new data. I found a workaround using the ./hxcfe -list command and looping through for each individual file, but the process of running the command 100+ times, opening and closing the bash program, is time consuming and resource heavy. is there a variation of the command line -getfile that will extract all?

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

Re: Trouble Compiling Emulator Software on Raspberry Pi Zero

Post by Jeff » Wed Jul 31, 2019 5:57 pm

Ttz0019 wrote:
Wed Jul 31, 2019 5:38 pm
I have an unknown number of utf-8 encoded documents with standardized file names but varied extensions (for some reason) in an .hfe file. I want to extract all of these documents to a folder and empty the .hfe to make room for new data. I found a workaround using the ./hxcfe -list command and looping through for each individual file, but the process of running the command 100+ times, opening and closing the bash program, is time consuming and resource heavy. is there a variation of the command line -getfile that will extract all?
This need to be done in command line ? Anyway with the GUI just click on the get files without selecting anything in the file selector and you will extract all files + subfolders.

Post Reply