-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following build directions lead to "libusb.home" is required for this build error. #9
Comments
You need to add the stuff in the "Building" section to your settings.xml too. |
Btw, I've never tried to build this on windows so I have no idea if it'll really work. But it kinda should :) |
Thank you very much for your timely response. i will try that and if it works will post promptly. |
Where do I find/create the settings.xml file? |
I saw that but in what directory inside the project directory do I place the settings.xml file? Sorry, should have been more clear. |
Following directions I was able to (finally) compile the LibUSB from git and was able to overcome the preceding error however there is now a new error: Why would this be happening? |
Same problem here, OSX mavericks 10.9.4. Downloaded your latest version 6c85311. I am following the 'Building' instructions as on https://github.com/trygvis/javax-usb-libusb1
so I run 'mvn install' in top level of the package. Gives BUILD FAILURE. I only see this warning and the message
Then I read on
Bit puzzling. Of course I want it easy as a starter. So do I need to do this? I already did install on top level? Anyway, just to see what happens, I execute cd libusb; mvn install Gives me EXACTLY the above warning and error. Check, yes I have 64 bit java and I want 64 bit which is the default anyway.
Reading on...
But I DO want to use the referenced libusb module. So I think I should skip this section. |
Tried some more. My guess is that the C code has to be built first. building the c/ directory 'make all' jus tgives me errors
Then trying the other C code, in javalibusb1/ subdirectory mvn package there gives
|
It seems something is missing on the sonartype repository. Check https://oss.sonatype.org/content/repositories/snapshots/io/trygvis/ You can see that there is no USB directory there. |
I also tried to compile libusb myself. But it seems broken, it does not even build. I filed a bug report there. |
After a full day of messing with libusb and javax-usb-libusb1 I finally got it all compiling and running. I'm running on the latest libusb . I finally got it compiled... Then, you need to put this settings file in $HOME/.m2
Then, the pom files need to be fixed, to use the official nar-maven-plugin Then, the actual library name as it is now is "libusb.h", so you need to add #include "libusb.h" A number of places in javalibusb do not initialize variables, causing errors and warnings. I set err=0 and transferred=0 initially. Seems to work. No idea if that is what is intended. But at least it compiles. In usbw.c, the function libusb_get_speed has been renamed to libusb_get_device_speed. I noticed that the original script also loads some poms in my .m2 directory without loading the associated jars. That caused some more erorrs , some compiler tried to open the expected jar which wasn't there and then you got a confusing "failed to open zip file" or something... My pom now looks like this:
I didn't put the modified c files here, too much text and only a few small changes. Hope tht this all helps! |
Running WINDOWS 7 but ran into same problem on Ubuntu 14.0.4
Very possible given my limited experience with these sorts of things that I am doing something very wrong.
I was trying to build the LibUSB directory using the suggestion you gave but it didn't work. I downloaded the LibUSB latest GIT from https://github.com/libusb/libusb and placed it in the javax-usb-libusb1-master/libusb-git folder, and then changed over to the javax-usb-libusb1-master/libusb directory and ran mvn install.
Before when I tried this I received a great deal of information about things being downloaded and ultimately ended up in failure.
This time when I tried it after having GITten the latest LibUSB build and placed it into the libusb-git directory, there was less information, but it still ended with the same error:
Y:\Development Tools\Java\javax-usb-libusb1-master\libusb>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
ded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Javalibusb1 :: libusb 1.0.1-1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ libusb ---
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "libusb.home" is required for this build.
[WARNING] Rule 2: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "libusb.cflags" is required for this build.
[WARNING] Rule 3: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "libusb.configure.args" is required for this build.
[WARNING] Rule 4: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "nar.optionSet.c" is required for this build.
[WARNING] Rule 5: org.apache.maven.plugins.enforcer.RequireProperty failed with
message:
Property "nar.optionSet.linker" is required for this build.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.302 s
[INFO] Finished at: 2014-06-06T10:51:48-06:00
[INFO] Final Memory: 7M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.
0:enforce (enforce-maven) on project libusb: Some Enforcer rules have failed. Lo
ok above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
Nothing I searched for could bring me an answer to this problem, and I don't really think it is an issue, but I was hoping to get some answers, and maybe it is an issue, I don't know, and if it's not, sorry for wasting your time.
The text was updated successfully, but these errors were encountered: