Pergunta

I have just changed to Fedora 20 and I am trying to get used to it and to learn it. Before I have only worked with ubuntu so there are some new things for me.

I have tried to compile openni_master by downloading the package from git. The first step is to enter

   /OpenNi_Master/Platform/Linux/CreateDist/  

ans to run sudo ./RedistMaker .

When I do that I get the following:

  fatal error: libusb-1.0/libusb.h: No such file or directory.

So I tried running

  sudo yum install libgusb.x86_64.

Running locate libgusb gives the .so files

  /usr/lib64/libgusb.so.2
  /usr/lib64/libgusb.so.2.0.3

but no libusb-1.0.h.

So I tried downloading the package libusb-1.0.18 from the web and compile it on my computer. But running ./configure in the folder gives

  checking for libudev.h... no
  configure: error: "udev support requested but libudev not installed"

So I installed

  libgudev1-devel.x86_64

and

  libgudev1.x86_64.

Probably I am installing the wrong packages, but I am new to Fedora and I don't really know where to search for them.

Any help is appreciated!

/ Erik

Foi útil?

Solução

In Fedora (and other distros using yum for package management), you can find out which package provides a certain file like so:

$ yum provides /path/to/my/file

If you only know a portion of the filename, you can use wildcards:

$ yum provides */myfile

So, what provides libusb.h?

$ yum provides */libusb.h
[...]
libusbx-devel-1.0.17-1.fc21.x86_64 : Development files for libusbx
Repo        : rawhide
Matched from:
Filename    : /usr/include/libusb-1.0/libusb.h
[...]

So you need to install libusbx-devel.

Outras dicas

I had a similar problem but libusb.h was present.

# CFLAGS="-O2 -Wall -march=native " ./configure --enable-scrypt --enable-Avalon
...
checking libudev.h usability... no
checking libudev.h presence... no
checking for libudev.h... no
configure: error: "udev support requested but libudev not installed"
configure: error: ./configure failed for compat/libusb-1.0

Fixed by installing an updated libudev:

# yum provides */libudev.h
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.clouvider.net
 * epel: ftp-stud.hs-esslingen.de
 * extras: centos.mirroring.pulsant.co.uk
 * rpmforge: fr2.rpmfind.net
 * updates: mozart.ee.ic.ac.uk
libudev-devel-147-2.73.el6_8.2.x86_64 : Development files for libudev
Repo        : base
Matched from:
Filename    : /usr/include/libudev.h

# yum install libudev-devel-147-2.73.el6_8.2.x86_64
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.clouvider.net
 * epel: ftp-stud.hs-esslingen.de
 * extras: centos.mirroring.pulsant.co.uk
 * rpmforge: fr2.rpmfind.net
 * updates: mozart.ee.ic.ac.uk
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libudev-devel.x86_64 0:147-2.73.el6_8.2 will be installed
--> Processing Dependency: udev = 147-2.73.el6_8.2 for package: libudev-devel-147-2.73.el6_8.2.x86_64
--> Running transaction check
---> Package udev.x86_64 0:147-2.46.el6 will be updated
---> Package udev.x86_64 0:147-2.73.el6_8.2 will be an update
--> Finished Dependency Resolution

# CFLAGS="-O2 -Wall -march=native " ./configure --enable-scrypt --enable-Avalon
...
checking libudev.h usability... yes
checking libudev.h presence... yes
checking for libudev.h... yes
checking for udev_new in -ludev... yes
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top