UnKn0wnBooof Posted May 17, 2014 Posted May 17, 2014 Hi, so I've started using Ubuntu (after a really long time) and I have a really frustrating problem. I have dfu-programmer-0.5.4 and I've already extracted everything from its archive, but I cannot compile the code so I can flash my duck. It cannot compile because the usb.h file is missing. lavanoid@Lavanoid-NB:/bin$ cd ~/bin lavanoid@Lavanoid-NB:~/bin$ ls arpsslstrip cpu_min_freq duckdump duckreset cpu_cur_freq cpu_temperature duckdump~ duckreset~ cpu_governor dfu-programmer-0.5.4 duckflash manservice cpu_max_freq DKE duckflash~ sslstrip.log lavanoid@Lavanoid-NB:~/bin$ cd d*4 lavanoid@Lavanoid-NB:~/bin/dfu-programmer-0.5.4$ ls aclocal.m4 ChangeLog configure.ac fedora Makefile.in src AUTHORS config.h.in COPYING m4 NEWS bootstrap.sh configure docs Makefile.am README lavanoid@Lavanoid-NB:~/bin/dfu-programmer-0.5.4$ sudo su [sudo] password for lavanoid: root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer-0.5.4# ./bootstrap.sh configure.ac:8: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see: configure.ac:8: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation configure.ac:15: installing 'm4/compile' root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer-0.5.4# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /home/lavanoid/bin/dfu-programmer-0.5.4/m4/missing: Unknown `--is-lightweight' option Try `/home/lavanoid/bin/dfu-programmer-0.5.4/m4/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for LIBUSB_1_0... no checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking usb.h usability... no checking usb.h presence... no checking for usb.h... no checking for ANSI C header files... (cached) yes checking for an ANSI C-conforming const... yes checking for size_t... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for working memcmp... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating fedora/dfu-programmer.spec config.status: creating Makefile config.status: creating docs/Makefile config.status: creating src/Makefile config.status: creating config.h config.status: executing depfiles commands root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer-0.5.4# make make all-recursive make[1]: Entering directory `/home/lavanoid/bin/dfu-programmer-0.5.4' Making all in src make[2]: Entering directory `/home/lavanoid/bin/dfu-programmer-0.5.4/src' gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c main.c:29:17: fatal error: usb.h: No such file or directory #include <usb.h> ^ compilation terminated. make[2]: *** [main.o] Error 1 make[2]: Leaving directory `/home/lavanoid/bin/dfu-programmer-0.5.4/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/lavanoid/bin/dfu-programmer-0.5.4' make: *** [all] Error 2 root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer-0.5.4# Can anyone help? Thanks. Quote
Sebkinne Posted May 17, 2014 Posted May 17, 2014 Yeah, you are simply missing the USB devices libraries: sudo apt-get libusb-dev That should do it. Best regards, Sebkinne Quote
UnKn0wnBooof Posted May 18, 2014 Author Posted May 18, 2014 Yeah, you are simply missing the USB devices libraries: sudo apt-get libusb-dev That should do it. Best regards, Sebkinne Hi, thanks for the reply, "sudo apt-get libusb-dev" didn't work because you forgot the "install" argument, thanks anyway - most appreciated. Now that I've managed to get libusb installed (thank you!) - I'm still faced with issues. I've also just fixed the "gawk" error by running "sudo apt-get install gawk". Never the less, I'm still encountering problems when I compile the program. Now my output is: root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer# ./bootstrap.sh configure.ac:8: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see: configure.ac:8: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /home/lavanoid/bin/dfu-programmer/m4/missing: Unknown `--is-lightweight' option Try `/home/lavanoid/bin/dfu-programmer/m4/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for LIBUSB_1_0... no using libusb checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking usb.h usability... yes checking usb.h presence... yes checking for usb.h... yes checking for usb_interrupt_read in -lusb... yes checking for ANSI C header files... (cached) yes checking for an ANSI C-conforming const... yes checking for size_t... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for working memcmp... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating fedora/dfu-programmer.spec config.status: creating Makefile config.status: creating docs/Makefile config.status: creating src/Makefile config.status: creating src/config.h config.status: executing depfiles commands root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer# make Making all in src make[1]: Entering directory `/home/lavanoid/bin/dfu-programmer/src' make all-am make[2]: Entering directory `/home/lavanoid/bin/dfu-programmer/src' gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c mv -f .deps/main.Tpo .deps/main.Po gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT arguments.o -MD -MP -MF .deps/arguments.Tpo -c -o arguments.o arguments.c mv -f .deps/arguments.Tpo .deps/arguments.Po gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT atmel.o -MD -MP -MF .deps/atmel.Tpo -c -o atmel.o atmel.c mv -f .deps/atmel.Tpo .deps/atmel.Po gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT commands.o -MD -MP -MF .deps/commands.Tpo -c -o commands.o commands.c mv -f .deps/commands.Tpo .deps/commands.Po gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT dfu.o -MD -MP -MF .deps/dfu.Tpo -c -o dfu.o dfu.c mv -f .deps/dfu.Tpo .deps/dfu.Po gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT intel_hex.o -MD -MP -MF .deps/intel_hex.Tpo -c -o intel_hex.o intel_hex.c mv -f .deps/intel_hex.Tpo .deps/intel_hex.Po gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c mv -f .deps/util.Tpo .deps/util.Po gcc -Wall -g -O2 -o dfu-programmer main.o arguments.o atmel.o commands.o dfu.o intel_hex.o util.o -lusb make[2]: Leaving directory `/home/lavanoid/bin/dfu-programmer/src' make[1]: Leaving directory `/home/lavanoid/bin/dfu-programmer/src' Making all in docs make[1]: Entering directory `/home/lavanoid/bin/dfu-programmer/docs' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/lavanoid/bin/dfu-programmer/docs' make[1]: Entering directory `/home/lavanoid/bin/dfu-programmer' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/lavanoid/bin/dfu-programmer' root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer# ls aclocal.m4 ChangeLog configure.ac m4 NEWS AUTHORS config.log COPYING Makefile README autom4te.cache config.status docs Makefile.am src bootstrap.sh configure fedora Makefile.in root@Lavanoid-NB:/home/lavanoid/bin/dfu-programmer# Really hope I can get this working . Quote
UnKn0wnBooof Posted May 18, 2014 Author Posted May 18, 2014 OH WOW! I FOUND AN ALTERNATIVE TO COMPILING THE SOURCE! I just discovered that if you enter "sudo apt-get install dfu-programmer" into the terminal, it installs the program! WOW! Did anyone else know about this? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.