jpoet / HauppaugeUSB

MythTV wrapper around the Hauppauge HD-PVR2/Colossus2 driver
GNU General Public License v3.0
16 stars 5 forks source link

compile error #11

Open glenb77 opened 5 years ago

glenb77 commented 5 years ago

following instructions; i get this error when i compile;

lboost_log_setup -lboost_system -lboost_thread -lboost_filesystem pkg-config --libs libusb-1.0 -lpthread /usr/bin/ld: libADV7842.a(FX2Device.o): in function FX2Device_t::loadFirmware()': /home/g/src/Hauppauge/HauppaugeUSB/./Hauppauge/Common/FX2API/FX2Device.cpp:89: undefined reference toFX2Device_t::m_firmwareBytesLen' /usr/bin/ld: /home/g/src/Hauppauge/HauppaugeUSB/./Hauppauge/Common/FX2API/FX2Device.cpp:89: undefined reference to `FX2Device_t::m_firmwareBytes' collect2: error: ld returned 1 exit status make: *** [Makefile:56: hauppauge2] Error 1

i am on arch linux; i believe i have the prerequisites installed; thanks for any help

glenb77 commented 5 years ago

the problem in arch linux is noted in this thread; https://bbs.archlinux.org/viewtopic.php?id=208677 the file link given is no longer there, but its the same error;

tinitussi commented 5 years ago

You need yaourt -S xxd-standalone then it will work

jpoet commented 5 years ago

tinitussi can you either send me a patch against the README.md file for arch, or tell me the exact set of package dependencies for arch so I can add it to the README?

tinitussi commented 5 years ago

xxd-standalone is a package file for Hexdump utility from vim which is needed to compile. but with this I can only compile the original App from Hauppauge. This package runs into this Error wrapLogInfo("encoderDev_DXT_t::~encoderDev_DXT_t()"); ^~~ ../../Common/EncoderDev/encoderDev_DXT.cpp:13:2: Anmerkung: empfohlene Alternative: »wrapLogError« wrapLogInfo("encoderDev_DXT_t::~encoderDev_DXT_t()"); ^~~ wrapLogError ../../Common/EncoderDev/encoderDev_DXT.cpp: In Elementfunktion »virtual bool encoderDev_DXT_t::init()«: ../../Common/EncoderDev/encoderDev_DXT.cpp:24:2: Fehler: »wrapLogInfo« wurde in diesem Gültigkeitsbereich nicht definiert wrapLogInfo("encoderDev_DXT_t::init()"); ^~~ ../../Common/EncoderDev/encoderDev_DXT.cpp:24:2: Anmerkung: empfohlene Alternative: »wrapLogError« wrapLogInfo("encoderDev_DXT_t::init()"); ^~~ wrapLogError ../../Common/EncoderDev/encoderDev_DXT.cpp: In Elementfunktion »virtual bool encoderDev_DXT_t::startCapture()«: ../../Common/EncoderDev/encoderDev_DXT.cpp:183:2: Fehler: »wrapLogInfo« wurde in diesem Gültigkeitsbereich nicht definiert wrapLogInfo("encoderDev_DXT_t::startCapture()"); ^~~ ../../Common/EncoderDev/encoderDev_DXT.cpp:183:2: Anmerkung: empfohlene Alternative: »wrapLogError« wrapLogInfo("encoderDev_DXT_t::startCapture()"); ^~~ wrapLogError ../../Common/EncoderDev/encoderDev_DXT.cpp: In Elementfunktion »virtual bool encoderDev_DXT_t::stopCapture()«: ../../Common/EncoderDev/encoderDev_DXT.cpp:190:2: Fehler: »wrapLogInfo« wurde in diesem Gültigkeitsbereich nicht definiert wrapLogInfo("encoderDev_DXT_t::stopCapture()"); ^~~ ../../Common/EncoderDev/encoderDev_DXT.cpp:190:2: Anmerkung: empfohlene Alternative: »wrapLogError« wrapLogInfo("encoderDev_DXT_t::stopCapture()"); ^~~ wrapLogError

tinitussi commented 5 years ago

Hello,

we need also yaourt -S boost-build-git

chaoticmachinery commented 4 years ago

To solve the original issue glenb77 had: 1) make sure xxd is installed 2) cd ./HauppaugeUSB 2) echo '#include "FX2Device.h"' > ./FX2Firmware.cpp 3) xxd -u -i ./Hauppauge/Common/FX2API/FX2Firmware.bin | sed -E 's/unsigned char [_a-zA-Z0-9]{1,}/const unsigned char FX2Firmware.cpp FX2Device_t::m_firmwareBytes/' | sed -E 's/unsigned int [_a-zA-Z0-9]{1,}/const unsigned int FX2Firmware.cpp Len/' >> ./FX2Firmware.cpp

dson2020 commented 4 years ago

Trying to install on Manjaro, I first got a boost error when using the make file. installing the boost packages and xxd fixed that. I then got the same error that glen77 did.

I did the above fix, but now trying make again I get this:

FX2Firmware.cpp:2:32: error: expected initializer before ‘.’ token 2 | const unsigned char FX2Firmware.cpp FX2Device_t::m_firmwareBytes[] = { | ^ FX2Firmware.cpp:1370:31: error: expected initializer before ‘.’ token 1370 | const unsigned int FX2Firmware.cpp Len = 16384;

neyuru commented 4 years ago

I did what @chaoticmachinery suggested. My error went from:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libADV7842.a(FX2Device.o): warning: relocation against _ZN11FX2Device_t15m_firmwareBytesE in read-only section .text /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: libADV7842.a(FX2Device.o): in function FX2Device_t::loadFirmware(): /root/src/Hauppauge/HauppaugeUSB/./Hauppauge/Common/FX2API/FX2Device.cpp:89: undefined reference to FX2Device_t::m_firmwareBytesLen /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /root/src/Hauppauge/HauppaugeUSB/./Hauppauge/Common/FX2API/FX2Device.cpp:89: undefined reference to FX2Device_t::m_firmwareBytes /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object collect2: error: ld returned 1 exit status make: *** [Makefile:56: hauppauge2] Error 1

to


FX2Firmware.cpp:2:66: error: invalid digit "9" in octal constant
    2 | const unsigned char FX2Firmware.cpp FX2Device_t::m_firmwareBytes-09-26_Common_FX2API_FX2Firmware_bin[] = {
      |                                                                  ^~
FX2Firmware.cpp:1370:40: error: invalid digit "9" in octal constant
 1370 | const unsigned int FX2Firmware.cpp Len-09-26_Common_FX2API_FX2Firmware_bin_len = 16384;
      |                                        ^~
FX2Firmware.cpp:2:32: error: expected initializer before '.' token
    2 | const unsigned char FX2Firmware.cpp FX2Device_t::m_firmwareBytes-09-26_Common_FX2API_FX2Firmware_bin[] = {
      |                                ^
FX2Firmware.cpp:1370:31: error: expected initializer before '.' token
 1370 | const unsigned int FX2Firmware.cpp Len-09-26_Common_FX2API_FX2Firmware_bin_len = 16384;

Any ideas?

neyuru commented 4 years ago

I managed to get past the last error. As said by @tinitussi and @chaoticmachinery xxd is a requirement for the build. As I am in Gentoo and I am not using vim, I downloaded a package named xxdi which is a standalone package that doesn't require all the dependencies of vim. The difference between the original xxd and xxdi is (apart from the name) that here is implemented as xxd -i -u ~~~ but the standalone package has the options implicit in it as it is called xxdi ~~~. This is a problem because the rules.mk file in _hauppauge_hdpvr2_157321_patched2016-09-26/Common/FX2API/ calls this function as xxd -i -u ~~~. So what I had to do is simply edit this file to be compatible with xxdi. And now my compilation is complete.

jpoet commented 4 years ago

Any chance you can send me a patched rules.mk file with tool dependent changes? It would be nice if it could detect that the existence of xxd or xxdi and use the appropriate tool with the appropriate arguments.

neyuru commented 4 years ago

sure =)

neyuru commented 4 years ago

this is my fork for xxdi