Discussion:
[Libusbx-devel] build error: undefined reference to `libusb_error_name'
Carl Karsten
2013-05-25 20:02:42 UTC
Permalink
I am trying to use
https://github.com/timvideos/HDMI2USB/tree/jahanzeb/release/R1/pre-build
which says "libusb fxload comes from
https://github.com/pbatard/fxload "

sudo apt-get install libusb-1.0-0-dev
git clone https://github.com/pbatard/fxload.git
cd fxload

***@dc10:~/tv/fxload$ make
cc -o fxload ezusb.o fxload.o -lusb-1.0
ezusb.o: In function `ezusb_write':
ezusb.c:(.text+0x137): undefined reference to `libusb_error_name'
ezusb.o: In function `ezusb_cpucs':
ezusb.c:(.text+0x473): undefined reference to `libusb_error_name'
ezusb.o: In function `ezusb_load_eeprom':
ezusb.c:(.text+0xab8): undefined reference to `libusb_error_name'
fxload.o: In function `main':
fxload.c:(.text+0x2cb): undefined reference to `libusb_error_name'
fxload.c:(.text+0x342): undefined reference to `libusb_error_name'
fxload.o:fxload.c:(.text+0x528): more undefined references to
`libusb_error_name' follow
collect2: ld returned 1 exit status
make: *** [fxload] Error 1

on Ubuntu 11.10,
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

--
Carl K
Pete Batard
2013-05-25 21:50:44 UTC
Permalink
Hi Carl,
Post by Carl Karsten
I am trying to use
https://github.com/timvideos/HDMI2USB/tree/jahanzeb/release/R1/pre-build
which says "libusb fxload comes from
https://github.com/pbatard/fxload "
Oh man, are people actually using that old code?
This is no longer maintained and has been superseded by the fxload app
in the libusbx directory.
Post by Carl Karsten
sudo apt-get install libusb-1.0-0-dev
libusb-1.0.0-dev is for libusb. The app above is designed for use with
libusbx.

I would strongly suggest that you:
- pick the latest version of libusbx from
git://github.com/libusbx/libusbx.git
- Use the fxload application from the examples directory there instead
of the old version from pbatard (which I will probably remove soon)

You can also find out more about libusb vs libusbx at http://libusbx.org.

Regards,

/Pete

PS: Please make sure you subscribe to the mailing list before posting.
How to subscribe is also detailed on the libusbx.org homepage
Carl Karsten
2013-05-26 03:58:16 UTC
Permalink
Post by Pete Batard
Hi Carl,
Post by Carl Karsten
I am trying to use
https://github.com/timvideos/HDMI2USB/tree/jahanzeb/release/R1/pre-build
which says "libusb fxload comes from
https://github.com/pbatard/fxload "
Oh man, are people actually using that old code?
This is no longer maintained and has been superseded by the fxload app in
the libusbx directory.
Post by Carl Karsten
sudo apt-get install libusb-1.0-0-dev
libusb-1.0.0-dev is for libusb. The app above is designed for use with
libusbx.
- pick the latest version of libusbx from
git://github.com/libusbx/libusbx.git
- Use the fxload application from the examples directory there instead of
the old version from pbatard (which I will probably remove soon)
According to these docs:

https://github.com/timvideos/HDMI2USB/wiki/Firmware

Note: the fxload version that ships with Ubuntu, Debian and possibly
other Linux distributions (0.0.20081013-1) does not support the -D
syntax as above.

and I think the fxload from libusbx/libusbx.git doesn't have that?

***@dc10:~/tv$ ./libusbx/examples/fxload -vvv -t fx2 -D 1443:0007 -I
./HDMI2USB/release/R1/pre-build/uvc_bulk.hex
/home/carl/tv/libusbx/examples/.libs/lt-fxload: invalid option -- 'D'

Any clue?
Pete Batard
2013-05-26 12:46:46 UTC
Permalink
We didn't carry the original fxload's options exactly because our
implementation is slightly different (it will produce output to stdout by
default, can autodetect FX devices and has a different set of options), and
we wanted to alert users of the original version to the fact that,
depending on the situation, libusbx's fxload and the original one are not
entirely interchangeable.

In your case, try -d instead of -D. Also "fxload -h" is your friend.

Regards,

/Pete
Post by Carl Karsten
Post by Pete Batard
Hi Carl,
Post by Carl Karsten
I am trying to use
https://github.com/timvideos/HDMI2USB/tree/jahanzeb/release/R1/pre-build
Post by Pete Batard
Post by Carl Karsten
which says "libusb fxload comes from
https://github.com/pbatard/fxload "
Oh man, are people actually using that old code?
This is no longer maintained and has been superseded by the fxload app in
the libusbx directory.
Post by Carl Karsten
sudo apt-get install libusb-1.0-0-dev
libusb-1.0.0-dev is for libusb. The app above is designed for use with
libusbx.
- pick the latest version of libusbx from
git://github.com/libusbx/libusbx.git
- Use the fxload application from the examples directory there instead of
the old version from pbatard (which I will probably remove soon)
https://github.com/timvideos/HDMI2USB/wiki/Firmware
Note: the fxload version that ships with Ubuntu, Debian and possibly
other Linux distributions (0.0.20081013-1) does not support the -D
syntax as above.
and I think the fxload from libusbx/libusbx.git doesn't have that?
./HDMI2USB/release/R1/pre-build/uvc_bulk.hex
/home/carl/tv/libusbx/examples/.libs/lt-fxload: invalid option -- 'D'
Any clue?
Carl Karsten
2013-05-26 16:57:38 UTC
Permalink
-d, got it. Thanks.

Sorry about being dense.. I don't know enough about what the commands
do to feel good about matching up -D and -d. For now I am just a
dumb user that wants to build this thing and use it. I am taking
notes so I can submit better setup docs, so at least I am not a
worthless user :)
Post by Pete Batard
We didn't carry the original fxload's options exactly because our
implementation is slightly different (it will produce output to stdout by
default, can autodetect FX devices and has a different set of options), and
we wanted to alert users of the original version to the fact that, depending
on the situation, libusbx's fxload and the original one are not entirely
interchangeable.
In your case, try -d instead of -D. Also "fxload -h" is your friend.
Regards,
/Pete
Post by Carl Karsten
Post by Pete Batard
Hi Carl,
Post by Carl Karsten
I am trying to use
https://github.com/timvideos/HDMI2USB/tree/jahanzeb/release/R1/pre-build
which says "libusb fxload comes from
https://github.com/pbatard/fxload "
Oh man, are people actually using that old code?
This is no longer maintained and has been superseded by the fxload app in
the libusbx directory.
Post by Carl Karsten
sudo apt-get install libusb-1.0-0-dev
libusb-1.0.0-dev is for libusb. The app above is designed for use with
libusbx.
- pick the latest version of libusbx from
git://github.com/libusbx/libusbx.git
- Use the fxload application from the examples directory there instead of
the old version from pbatard (which I will probably remove soon)
https://github.com/timvideos/HDMI2USB/wiki/Firmware
Note: the fxload version that ships with Ubuntu, Debian and possibly
other Linux distributions (0.0.20081013-1) does not support the -D
syntax as above.
and I think the fxload from libusbx/libusbx.git doesn't have that?
./HDMI2USB/release/R1/pre-build/uvc_bulk.hex
/home/carl/tv/libusbx/examples/.libs/lt-fxload: invalid option -- 'D'
Any clue?
Carl Karsten
2014-04-06 16:00:20 UTC
Permalink
Does anyone know if the current fxload is in a debian repo or PPA?

I found one in
https://launchpad.net/~dietdrpeper/+archive/ppa/+packages

but in the changelog:

* renamed to fxload from hotplug-utils
Post by Pete Batard
We didn't carry the original fxload's options exactly because our
implementation is slightly different (it will produce output to stdout by
default, can autodetect FX devices
and has a different set of options), and we wanted to alert users of the
Post by Pete Batard
original version to the fact that, depending on the situation, libusbx's
fxload and the original one are not entirely interchangeable.
In your case, try -d instead of -D. Also "fxload -h" is your friend.
Regards,
/Pete
Post by Carl Karsten
Post by Pete Batard
Hi Carl,
Post by Carl Karsten
I am trying to use
https://github.com/timvideos/HDMI2USB/tree/jahanzeb/release/R1/pre-build
Post by Pete Batard
Post by Carl Karsten
which says "libusb fxload comes from
https://github.com/pbatard/fxload "
Oh man, are people actually using that old code?
This is no longer maintained and has been superseded by the fxload app
in
Post by Pete Batard
the libusbx directory.
Post by Carl Karsten
sudo apt-get install libusb-1.0-0-dev
libusb-1.0.0-dev is for libusb. The app above is designed for use with
libusbx.
- pick the latest version of libusbx from
git://github.com/libusbx/libusbx.git
- Use the fxload application from the examples directory there instead
of
Post by Pete Batard
the old version from pbatard (which I will probably remove soon)
https://github.com/timvideos/HDMI2USB/wiki/Firmware
Note: the fxload version that ships with Ubuntu, Debian and possibly
other Linux distributions (0.0.20081013-1) does not support the -D
syntax as above.
and I think the fxload from libusbx/libusbx.git doesn't have that?
./HDMI2USB/release/R1/pre-build/uvc_bulk.hex
/home/carl/tv/libusbx/examples/.libs/lt-fxload: invalid option -- 'D'
Any clue?
Pete Batard
2014-04-07 21:19:33 UTC
Permalink
Hi Carl,
Post by Carl Karsten
Does anyone know if the current fxload is in a debian repo or PPA?
All I can tell you, is what the initial commit for fxload reports [1]:
* This program was modified from the original fxload at:
http://linux-hotplug.sourceforge.net to add libusb
as well as non HEX images support.

I think this is the project Debian use as their base, but the original
project's fxload doesn't seem to have been updated for some time.
Post by Carl Karsten
* renamed to fxload from hotplug-utils
fxload.c was originally main.c in the linux-hotplug project.

Regards,

/Pete

PS: Your patch has now been applied into the libusb repository

[1]
https://github.com/libusb/libusb/commit/05975333c53d58a98b1e91f1edd220d794c7dd46
Ludovic Rousseau
2014-04-08 09:00:50 UTC
Permalink
Post by Pete Batard
Hi Carl,
Post by Carl Karsten
Does anyone know if the current fxload is in a debian repo or PPA?
http://linux-hotplug.sourceforge.net to add libusb
as well as non HEX images support.
I think this is the project Debian use as their base, but the original
project's fxload doesn't seem to have been updated for some time.
Debian provides a fxload package [2].
But this fxload package has not been updated since Apr 2010 [3].

fxload from Debian comes from http://linux-hotplug.sourceforge.net/
This version has not been updated since 5 years [4].

If you really want to use the fxload from libusb/examples/ you will
have to build it yourself. Sorry.

Bye
Post by Pete Batard
Post by Carl Karsten
* renamed to fxload from hotplug-utils
fxload.c was originally main.c in the linux-hotplug project.
Regards,
/Pete
[1]
https://github.com/libusb/libusb/commit/05975333c53d58a98b1e91f1edd220d794c7dd46
[2] https://packages.debian.org/search?keywords=fxload
[3] http://metadata.ftp-master.debian.org/changelogs//main/f/fxload/fxload_0.0.20081013-1_changelog
[4] http://linux-hotplug.cvs.sourceforge.net/viewvc/linux-hotplug/fxload/
--
Dr. Ludovic Rousseau
Loading...