Fatal error libudev h no such file or directory

I compile with g++/gcc on ubuntu12.04 and it is "OK" but I cannot cross compile using raspberry pi tools master toolsmaster CC := /home/Desktop/Simple_Linux_Driver/tools-master/arm-bcm2708/arm-b...

I compile with g++/gcc on ubuntu12.04 and it is «OK» but I cannot cross compile using raspberry pi tools master

toolsmaster 
CC := /home/Desktop/Simple_Linux_Driver/tools-master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-g++
GCC := /home/Desktop/Simple_Linux_Driver/tools-master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc

I had install the following item:

-sudo apt-get install libusb-1.0-0-dev
-sudo apt-get install libudev-dev

raspberry pi kernel version 3.2.27 (izzit I need to enable «how» and rebuilt again)?

brasofilo's user avatar

brasofilo

25.2k15 gold badges90 silver badges178 bronze badges

asked Jul 23, 2013 at 10:50

WenJuan's user avatar

Its works!!! i need to cross compile and cp .h .so inside raspberry pi cross toolsmaster
Below is what i try:
Do let me know if i miss out anythings Thanks^^
download libusb latest version tar file.

version 1.0.8

$ TOOLCHAIN=/opt/FriendlyArm/toolchain/4.4.3/arm-none-linux-gnueabi
$ PATH=$PATH:$TOOLCHAIN/bin
$ CC='arm-none-linux-gnueabi-gcc -march=armv4t -mtune=arm920t'
$ CROSS_COMPILE=arm-none-linux-gnueabi-
$ export CC CROSS_COMPILE
$ tar xfv libusb-1.0.8.tar
$ cd libusb-1.0.8
$ ./configure --host arm-linux
$ make
$ cd libusb
$ cp libusb.h $TOOLCHAIN/arm-none-linux-gnueabi/include/
$ cp libusb.h $TOOLCHAIN/arm-none-linux-gnueabi/sysroot/include/
$ cp .libs/libusb-1.0.so $TOOLCHAIN/arm-none-linux-gnueabi/lib/
$ cp .libs/libusb-1.0.so $TOOLCHAIN/arm-none-linux-gnueabi/sysroot/lib/

THE TOOLCHAIN IS SET.
for writing programs:
add #include to use he library.
compile using following:

$arm-linux-g++ myprog.cpp -o myapp -lusb-1.0

NOTE: DON’T MISSOUT ON «-lusb-1.0»

answered Jul 31, 2013 at 6:44

WenJuan's user avatar

WenJuanWenJuan

5941 gold badge7 silver badges18 bronze badges

If you do above it will install libraries that is for x86.
The above libraries should be in raspberry cross-tool chain. if its not present then you need cross-compile it for arm architecture. Then you have to export it by follwing cmd

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path to library

First export the tools using export command.

export PATH=$PATH:/path to tool chain

Before doing above 1st try the following

e.g export PATH=$PATH:/home/Desktop/Simple_Linux_Driver/tools-master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/

if you want to export it everytime in every terminal then .

vi .bashrc

At the end of file just add below command .

export PATH=/path to tool chain bin:$PATH

e.g export PATH=/opt/Arm_tool_chain/bin:$PATH

answered Jul 23, 2013 at 11:13

vinay hunachyal's user avatar

vinay hunachyalvinay hunachyal

3,7312 gold badges19 silver badges31 bronze badges

5

Содержание

  1. Compile error during install: «fatal error: libudev.h: No such file or directory» #6
  2. Comments
  3. фатальная ошибка: libudev.h: нет такого файла или каталога
  4. 2 ответы
  5. Problems installing the development dependencies #1771
  6. Comments
  7. My system
  8. Common prerequisites
  9. Installing npm dependencies
  10. Fatal error libudev h no such file or directory
  11. Иди: иди к ветеринару. libudev: нет такого файла или каталога

Compile error during install: «fatal error: libudev.h: No such file or directory» #6

Describe Your Problem:

  • Plugin installs but with error messages
  • Plugin does not create any log entries after restart
  • No devices supported by this plugin are found

Logs:
Install:

compilation terminated. make: *** [libusb.target.mk:150: Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1 make: Leaving directory ‘/homebridge/node_modules/homebridge-plugin-govee/node_modules/usb/build’ gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Linux 5.4.0-52-generic gyp ERR! command «/usr/local/bin/node» «/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js» «rebuild» gyp ERR! cwd /homebridge/node_modules/homebridge-plugin-govee/node_modules/usb gyp ERR! node -v v14.15.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.3 (node_modules/homebridge-plugin-govee/node_modules/usb): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.3 install: `prebuild-install —verbose || node-gyp rebuild` npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 + homebridge-plugin-govee@1.0.3 updated 1 package in 19.522s»>

Plugin Config:

Screenshots:
n/a

Environment:

  • Plugin Version: 1.0.3
  • Homebridge Version: 1.1.6
  • Node.js Version: v14.15.0
  • NPM Version: 6.14.8
  • Operating System: Docker

The text was updated successfully, but these errors were encountered:

Источник

фатальная ошибка: libudev.h: нет такого файла или каталога

Я компилирую с помощью g++/gcc на ubuntu12.04, и это «ОК», но я не могу кросс-компилировать с помощью мастера инструментов raspberry pi.

Я установил следующий элемент:

Версия ядра raspberry pi 3.2.27 (мне нужно включить «как» и пересобрать заново)?

задан 23 июля ’13, 11:07

2 ответы

Это работает. Мне нужно перекрестно скомпилировать и cp .h .so внутри raspberry pi cross toolsmaster Вот что я пытаюсь сделать: Дайте мне знать, если я что-то пропущу Спасибо ^^ загрузите tar-файл последней версии libusb.

ИНСТРУМЕНТАЛЬНАЯ ЦЕПОЧКА УСТАНОВЛЕНА. для написания программ: добавьте #include, чтобы использовать библиотеку. скомпилировать, используя следующее:

ПРИМЕЧАНИЕ: НЕ ПРОПУСТИТЕ «-lusb-1.0»

Создан 31 июля ’13, 07:07

Если вы сделаете выше, он установит библиотеки для x86. Вышеупомянутые библиотеки должны быть в цепочке кросс-инструментов Raspberry. если его нет, вам нужно кросс-компилировать его для архитектуры рук. Затем вам нужно экспортировать его, выполнив cmd

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path to library

Сначала экспортируйте инструменты, используя export команда.

export PATH=$PATH:/path to tool chain

Прежде чем делать выше 1-го, попробуйте следующее

например, экспорт PATH=$PATH:/home/Desktop/Simple_Linux_Driver/tools-master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/

если вы хотите экспортировать его каждый раз в каждом терминале, тогда .

В конце файла просто добавьте команду ниже.

export PATH=/path to tool chain bin:$PATH

например export PATH=/opt/Arm_tool_chain/bin:$PATH

Источник

Problems installing the development dependencies #1771

As I already mentioned in my pull request #1768, I have problems getting the Etcher development dependencies to work on my machine although I closely followed the contributing guide.

My system

  • elementary OS 0.4.1 Loki (64-bit)
  • Built on Ubuntu 16.04.3 LTS

Common prerequisites

  • node —version – v8.7.0
  • python —version – Python 2.7.12
  • jq —version – jq-1.5-1-a5b5cbe
  • curl —version – curl 7.47.0 [. ]

Installing the requirements.txt using pip also worked.

Installing npm dependencies

This is where it started to get confusing. First of all the guide says that you should install the prerequisites before running the install script, a script which isn’t mentioned later on. I just skipped that and ran make electron-develop . This threw a bunch of errors, so I recorded it with asciinema.

After that, I tried running npm start anyways, but it didn’t work.

The text was updated successfully, but these errors were encountered:

Looks like libusb from our usb dependency blew up during installation; @jviotti any idea what might have gone wrong here?

../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory compilation terminated.

@jviotti Seems like I haven’t. After installing libudev-dev through apt , it works. That and the confusing reference to an install script should be fixed in the documentation.

Источник

Fatal error libudev h no such file or directory

I am trying to build Qt5.10.1, on Ubuntu (intel), for beaglebone black.
This is my configure call:

../qt-everywhere-src-5.10.1/configure -v -platform linux-g++ -release -device linux-beagleboard-g++ -sysroot

/qt-bbb/sysroot-glibc-linaro-2.25-2017.11-arm-linux-gnueabihf -prefix /usr/local/qt5 -device-option CROSS_COMPILE=

/qt-bbb/gcc-linaro.7.2.1-2017.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -qt-xcb -egl -opengl es2 -force-pkg-config -skip qtwebengine -opensource -confirm-license

This is what I get:

Note: No wayland-egl support deteced. Cross-toolkit compatibility disabled.
ERROR: Feature ‘pkg-config’ was enable, but the pre-condition ‘tests.pkg-config’ failed.
ERROR: Feature ‘xcb’ was enabled, but the pre-condition ‘libs.xcb’ failed.
ERROR: Feature ‘opengles2’ was enabled, but the pre-condition ‘config.win32 || (!config.watchos && !features.opengl-desktp && libs.opengl_es2)’ failed.
ERROR: Feature ‘egl’ was enabled, but the pre-condition »features.opengl || features.openvg) && (features.angle || libs.egl)’ failed.
ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

(The text was copied by human. If there are any typos, do not be irritated. The virtualbox extension stuff for shared clipboard is not yet present ;))

What does it mean, «precondition failed»?
And as for modification of the search paths for the OpenGL things, can someone shed some light on the way they need to be modified? Do I need to install something more?

@sktrpi The tests for all these features failed.
To find out what is missing add -v parameter to configure, try again and see what exactly is missing (header files and libs for these features are missing).

-v already is the first parameter to my configure call? Or do I misunderstand?

@sktrpi Then check the output of configure to see what exactly is missing

I don’t see any other complaints in the output other than the given ones.
Before the errors, only the build options are listed.

So, what am I supposed to be looking for? What is the output supposed to look like? I don’t see any more details than the error messages I quoted, despite the -v on configure.

EDIT:
By the way: If I configure with skipping opengl stuff, do not specify xcb (no idea whether that’s good), and skip building examples etc, configure runs to end, and make runs to end (which it wouldn’t without skipping the mentioned things).
I am curious now whether I can build a project that actually runs on target with that, but I’m not quite there yet.

I would, obviously, much prefer if OpenGL worked. 😉

Can no-one tell why -v does not give me more details about what’s wrong? It seems to be a standard answer I have seen in several threads here, but doesn’t appear to help in this instance, unless I’m missing something.

@sktrpi Can you try to call configure -v from a clean state and post the whole output here?

Ah! Using a new folder for building, there are a few things failing quite early on, but it keeps going. I was somehow thinking it should go over the failed things again when starting again.
Seems there’s quite some stuff missing. I did look at tutorials for this and installed prerequisites they listed, though.
The error messages at the end are slightly different now: pkg-config was not mentioned last time.

I cannot post the whole thing, it’s way too much for this textbox’s limits. I’ll post only what failed, and cut way fluff (and paste only some instances of repeating stuff like paths).
I wonder how I got it to make by leaving out openGL, given all those things missing.
I also wonder why occasionally, some windows stuff is mentioned.

The configure was:

@sktrpi «main.cpp:2:10: fatal error: dbus/dbus.h: No such file or directory» — DBus header files missing. If you need DBus support install DBus devel package.
Same goes for all the other failed tests with missing header files — you need to install devel packages for everything you want to use.

Hrm. But it complains e.g. about libudev missing. If I do «sudo apt install libudev-dev», at the end it says «0 upgraded, 0 newly installed»
(and before that it lists a bunch of packages «were automatically installed and are no longer required» . «..autoremove to remove them». — is it a good idea to follow such suggestions, btw, to keep the system clean? I don’t think I did it on this installation, but just to know. )

So it was already there, yet configure complained it’s missing.
What could cause that?
Also, this scheme of

-dev(el) seems not to hold true for even most of the things listed, according to what apt install finds.

Looking from a higher perspective:
Is there a way to «just install everything commonly needed, dammit!» instead of going over every single thing the build needs and searching for the correct way / actual library (version) to install?
This whole process, as it currently presents itself to me, does not the least bit resemble something I would dare to call a sound or sane procedure. I feel more like a monkey poking at a hornets nest with a stick.
So I assume what I am doing here is not «the way» things should be done? Alas I haven’t found «the way».

@sktrpi Since you’re cross compiling for another device: do you install those dev packages in your sysroot? It will not help to install them on your host, you need these packages (headers/libs) in your sysroot.

Heh. Likely. I wondered this myself before, and shrugged it off for the time being, as I thought, when following a tutorial (maybe less closely than I thought) for this, they are probably right, and I, so far a rather casual Linux user, am probably not when I doubt something, not knowing what all things do behind the scenes.

Thanks for your help so far. I have to do some more general, non Qt specific reading now it seems, before I probably will be back with questions nonetheless 😉

Ah, you don’t happen to have a rough estimate at hand of how much storage space a built Qt 5.10 will take for linux arm hf platform?
It would be great to know if more things than the web thing can be left out of the build without problems, and if it is worthwhile space wise.
I only need a basic GUI program that sends/receives some data over sockets and UART, displays a few images and stores info to disk. Nothing fancy.

@sktrpi Just build QtCore, QtWidgets, networking stuff and QtSerial. I don’t know how much space this will take but for sure much less than whole Qt build (and build will be faster and less dependencies needed :-)).

Источник

Иди: иди к ветеринару. libudev: нет такого файла или каталога

Я настраиваю go vet для более старого проекта, который использует CGO. У меня нет опыта работы с CGO, и я не могу это исправить.

На моем локальном компьютере установлена ​​версия 1.15, и я запускаю macOS. Когда я запускаю go vet -mod=vendor локально, я не получаю ошибки. Однако в действиях Github, когда я запускаю go vet -mod=vendor , я получаю

Я пробовал следующее:

  1. go vet -mod=vendor ./.
  2. go vet -mod=vendor
  3. go vet -mod=vendor1
  4. $(go list ./. | grep -v /vendor/)
  5. CGO_ENABLED=1 go vet -mod=vendor ./.
  6. CGO_ENABLED=1 go vet -mod=vendor -v $(go list ./. | grep -v /vendor/)

Все эти три работают нормально локально, но не работают в CI с упомянутой выше ошибкой. Пожалуйста, расскажите мне, почему это происходит и как я могу это исправить.

Спины CI: образ докера ubuntu-latest с go 1.15

Вы используете cgo, и ошибка показывает отсутствие файла заголовка libudev, так что вы установили libudev в системе CI?

Большое спасибо за лидерство. Я не помню, как устанавливал libudev локально, возможно, он был установлен по умолчанию в macos.

Я застрял в этом в течение нескольких часов без свинца. Надеюсь, это сработает, попробую установить в CI.

Но я до сих пор не понимаю, почему go vet запускается в папке vendor.

Извините, я не понимаю вопроса. go vet должен анализировать все тот же исходный код, который будет скомпилирован, что, если вы получаете его из папки vendor , то само собой разумеется, что go vet необходимо читать из папки vendor .

хм, это имеет смысл. Теперь я понимаю, почему люди голосуют против этого вопроса.

Источник

EDIT 1: The package is now pcloudcc-git: https://aur.archlinux.org/packages/pcloudcc-git/
EDIT 2: After resolving the git error, there is a new error. See comments.
EDIT 3: current PKGBUILD for pcloudcc-git fixes the issues.

This is the error I get when building pcloudcc in a chroot.

==> Making package: pcloudcc 2.0.1-2 (Tue 20 Oct 2020 09:22:41 PM EDT)
==> Retrieving sources...
  -> Cloning pcloudcc git repo...
Cloning into bare repository '/home/myuser/.cache/aurutils/sync/pcloudcc/pcloudcc'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 12116 (delta 0), reused 0 (delta 0), pack-reused 12112
Receiving objects: 100% (12116/12116), 27.85 MiB | 16.68 MiB/s, done.
Resolving deltas: 100% (7286/7286), done.
==> Validating source files with sha256sums...
    pcloudcc ... Skipped
==> ERROR: Cannot find the git package needed to handle git sources.
==> ERROR: Build failed, check /mnt/chroots/test1/extra-x86_64/myuser/build
xargs: aur: exited with status 255; aborting

I notice the last path mentioned is correct/expected (/mnt/chroots/test1/extra-x86_64), but earlier the output says, «Cloning into bare repository ‘/home/myuser/.cache/aurutils/sync/pcloudcc/pcloudcc’…» I was not expecting anything to be put into that location. Is that something aurutils requires or do I have an incorrect config? I have a repository location defined and I pass it to aur sync like this, but the message above suggests maybe something is wrong.

xargs -a tobuild.txt aur sync --chroot --sign --upgrades --noconfirm --database="$reponame" --directory=/$CHROOT

Other packages are getting added to that repository location and the db there.

Also, is that directory mismatch related to the error «Cannot find the git package needed to handle git sources»?

My full build steps are listed here:
https://bbs.archlinux.org/viewtopic.php?id=260048

I can build simple packages, but a number of packages I’m trying to build fail with different errors when I build them in a chroot, and I’m new to this. I’m trying to solve one error at a time.

Last edited by MountainX (2020-10-23 07:10:30)

LicaLord

Posts: 4
Joined: Sat Jan 26, 2019 1:23 pm

Ludev error cross compile

Hey hey ,

I am sorry if this the wrong to post this .

So here’s the problem : I am trying to cross compile a .c file for my raspberry but the library cannot be found even if I add -ludev .

Btw when using gcc there is no errors at all xp

So now i am not sure if I have to change something in the menuconfig or not

Thx and i hope someone can give me an hand or an arm 😁


User avatar

Paeryn

Posts: 3531
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Ludev error cross compile

Sat Jan 26, 2019 4:29 pm

LicaLord wrote: ↑

Sat Jan 26, 2019 2:38 pm


So here’s the problem : I am trying to cross compile a .c file for my raspberry but the library cannot be found even if I add -ludev .

Btw when using gcc there is no errors at all xp

So now i am not sure if I have to change something in the menuconfig or not

How exactly are you cross-compiling? When you say using gcc gives no errors do you mean using gcc on the RPi or on your host PC and are you having problems when using some other host compiler? Is the library not being found at link time or at run time?

And what is menuconfig? I only know that as being used in configuring Linux kernel source, not in any other project.

She who travels light — forgot something.
Please note that my name doesn’t start with the @ character so can people please stop writing it as if it does!


LicaLord

Posts: 4
Joined: Sat Jan 26, 2019 1:23 pm

Re: Ludev error cross compile

Sat Jan 26, 2019 4:49 pm

I meant gcc on my host pc. i am trying to use the arm-buildroot…-gcc in order to cross compile it.
The error is » fatal error: libudev.h: No such file or directory» although i have that library installed.

I am kind of new to buildroot and i am in doubt if there is any configuration that i missed in the menuconfig or not :/

This is what i am doing

View post on imgur.com

and then this happens

View post on imgur.com


LicaLord

Posts: 4
Joined: Sat Jan 26, 2019 1:23 pm

Re: Ludev error cross compile

Sat Jan 26, 2019 6:23 pm

So i think i am getting somewhere … somewhere in buildroot i need to enable libudev so he does all the work for me so i don t need to download the library and cross compile it by hand xD


User avatar

Paeryn

Posts: 3531
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Ludev error cross compile

Sat Jan 26, 2019 9:03 pm

It’s makes life a lot easier to paste text straight into your post rather than putting links to pictures of said text, especially when one of them is only one line long (and I’ve just noticed you’d cropped the underscores from the image so they look like spaces). E.g.

Code: Select all

arm-buildroot-linux-uclibcgnueabihf-gcc udev_usb_monitor.c -o raspudev -ludev

I don’t feel like writing the other one out, but it says it can’t find the header libudev.h, typically that is from only installing the runtime part library (the parts needed for other programs to use it) and not it’s corresponding development part (which contains the bits needed to compile against it). Buildroot will need an implementation of libc, I think it defaults to uclibc but it can use glibc as well. I don’t know if you are expected to download your chosen version manually or if it will automatically downoload (or comes with) a default.

She who travels light — forgot something.
Please note that my name doesn’t start with the @ character so can people please stop writing it as if it does!


LicaLord

Posts: 4
Joined: Sat Jan 26, 2019 1:23 pm

Re: Ludev error cross compile

Sat Jan 26, 2019 11:17 pm

Well problem fixed ! i just needed to change some settings in buildroot and taraaahhh ! xp

Thanks for the tips ! :p

This topic can be closed x)


Return to “C/C++”

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error libpq fe h no such file or directory
  • Fatal error libguile h no such file or directory
  • Fatal error libelf h no such file or directory
  • Fatal error lber h no such file or directory
  • Fatal error l1101 invalid object module

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии