LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-06-2014, 04:57 AM   #1
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Rep: Reputation: Disabled
Libusb 1.0.19 Compilation


I have downloaded libusb-1.0.19 from https://github.com/libusb/libusb. I want to compile library, in the install file, compilation process is explained:

`cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.

However, when I cd the containing the package's source code and type ./configure it gives this error:

No such file or directory
There is only configure.ac in the directory. When I type ./configure.ac, it also gives an error.

How can I create Makefile in order to compile and create .so file of the libusb-1.0.19? Thank you.
 
Old 11-06-2014, 06:21 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.

Why don't you install a "libusb package" for your OS ?
... Which OS are you using ? ?
* May be you are just missing libusb**-dev ?

* No ``Linux OS´´ comes without a libusb :
$ ls /usr/lib*/libusb*


About https://github.com/libusb/libusb :
$ ./autogen.sh
.... But please don't install it,
may conflict with / destroy the current installed libusb*

-
 
Old 11-06-2014, 06:39 AM   #3
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
I'm using Windows 7. I'll use the libusb library in another project. When I compiled that project it gives that error:

lib/libcyusb.c:20:32: fatal error: /libusb-1.0/libusb.h: No such file or directory
#include </libusb-1.0/libusb.h>

That's why I try to compile libusb-1.0.19. How can I add libusb library to my project in Netbeans?

In the project's README:
"Pre-requisites:
1. libusb-1.0.x is required for compilation and functioning of the API
library."
 
Old 11-06-2014, 04:40 PM   #4
brebs
Member
 
Registered: May 2013
Posts: 89

Rep: Reputation: Disabled
Run its bootstrap.sh script first:

Code:
./bootstrap.sh
 
Old 11-07-2014, 03:15 AM   #5
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
I ran it, it gives:
libtoolize or glibtoolize was not found! Please install libtool.
 
Old 11-07-2014, 03:21 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
Please install libtool.
You will have to install the package 'libtool'.




-

Last edited by knudfl; 11-07-2014 at 04:00 AM.
 
Old 11-07-2014, 03:37 AM   #7
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
There is bootstrap.h file in libusb-1.0.19 folder?
 
Old 11-07-2014, 04:44 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Windows© 7 : Are you using Cygwin ?

Libtool, autoconf, automake for Cygwin :
https://www.sourceware.org/autobook/...obook_244.html
 
Old 11-07-2014, 07:47 AM   #9
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
Yes I am using Cygwin64, there is a configure.ac file in libusb-1.0.19 folder however there isn't configure file. As far as I understand configure.ac will be used to create configure. However, in that link you provided:

A binary package of Autoconf for Cygwin version 1.1.1 is available from the CygUtils website(62).

When I click that website, the domain "http://cygutils.netpedia.net/V1.1/" is for sale. Where can I download binary version of autoconf tool?
 
Old 11-07-2014, 10:24 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #9 .

Cygwin64 binary packages ...
http://cygwin.mirror.constant.com/x86/release/Cygwin64/

libtool
http://cygwin.mirror.constant.com/x8...win64-libtool/
http://cygwin.mirror.constant.com/x8....4.2-2.tar.bz2
→ → cygwin64-libtool-2.4.2-2.tar.bz2

autoconf
http://cygwin.mirror.constant.com/x8...f/autoconf2.5/
http://cygwin.mirror.constant.com/x8...2.69-2.tar.bz2
→ → autoconf2.5-2.69-2.tar.bz2

automake
http://cygwin.mirror.constant.com/x8.../automake1.14/
http://cygwin.mirror.constant.com/x8...1.14-1.tar.bz2
→ → automake1.14-1.14-1.tar.bz2
... Also see the text file `setup.hint' : automake requires perl, etc.
http://cygwin.mirror.constant.com/x8.../automake1.14/


-

Last edited by knudfl; 11-07-2014 at 10:30 AM.
 
Old 11-07-2014, 10:31 AM   #11
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
I have downloaded and installed the autoconf. Then I type: "autoconf" in command line. My configure.ac gives these errors:
configure.ac:29: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:30: error: possibly undefined macro: AM_MAINTAINER_MODE
configure.ac:42: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:190: error: possibly undefined macro: AM_CONDITIONAL
 
Old 11-07-2014, 11:00 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #11 .

Why not use the default libusb-1.0.19 ?
http://cznic.dl.sourceforge.net/proj...1.0.19.tar.bz2
... The "configure" file is already present !


And : You cannot run autoconf directly in the
https://github.com/libusb/libusb version.
See post #2 : $ ./autogen.sh

I.e. './autogen.sh' will do something like :
$ libtoolize && aclocal && autoheader && automake --add-missing && autoconf

-
 
Old 11-08-2014, 03:28 AM   #13
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thank you, I have downloaded http://cznic.dl.sourceforge.net/proj...1.0.19.tar.bz2 and configure it succesfully. After configuration, I type make command and it gives those errors:

/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:160: undefined reference to `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:160.text+0xd68): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:182: undefined reference to `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:182.text+0xec1): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:185: undefined reference to `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:185.text+0xf33): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_snprintf'
os/.libs/libusb_1_0_la-windows_usb.o: In function `get_windows_version':
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:910: undefined reference to `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:910.text+0x2fb0): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:915: undefined reference to `_snprintf'
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:915.text+0x3186): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_snprintf'
os/.libs/libusb_1_0_la-windows_usb.o:/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:917: more undefined references to `_snprintf' follow
os/.libs/libusb_1_0_la-windows_usb.o: In function `get_windows_version':
/cygdrive/c/Users/Sercan/Desktop/libusb-1.0.19/libusb/os/windows_usb.c:917.text+0x3261): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_snprintf'
 
Old 11-08-2014, 06:29 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #13 .

Have you looked into { Google .. undefined reference to `_snprintf' .. }
https://www.google.com/webhp?hl=all&...60_snprintf%27

May be there's a solution here
http://embdev.net/topic/218726

-
 
Old 11-10-2014, 07:43 AM   #15
burhaneyuboglu
LQ Newbie
 
Registered: Oct 2014
Posts: 14

Original Poster
Rep: Reputation: Disabled
libusb compilation

Now I'm working on linux. When I try to make ./configure command, it gives that error:
Configure error:
udev support requested but libudev not installed
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb.h and libusb. stf92 Programming 1 01-21-2014 03:16 PM
[SOLVED] ubuntu 9.10 - #include <libusb/libusb.h> stonehinge03 Linux - Newbie 5 04-20-2010 09:02 AM
driver help with libusb halfwit Linux - Hardware 19 01-23-2008 12:59 AM
How to Install Libusb jsilvester Linux - Newbie 3 01-10-2008 06:34 AM
libUSB install Dutch3 Linux - Newbie 1 04-30-2002 07:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration