Skip to content
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

ERROR: LoadError: ArgumentError: LibSerialPort not found in path #1

Closed
chrobione opened this issue Mar 18, 2016 · 8 comments
Closed

Comments

@chrobione
Copy link

I am having troubles with LibSerialPort or at least I think this error is telling me:

ERROR: LoadError: ArgumentError: LibSerialPort not found in path
 in require at ./loading.jl:233
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in process_options at ./client.jl:280
 in _start at ./client.jl:378

I went through all of the information to get libserialport installed from http://sigrok.org/wiki/Libserialport.
No errors happened during the compile process, except for missing compiler tools.
make and make install completed without errors.

Here is the information when I fired up julia:

              _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.2 (2015-12-06 21:47 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org release
|__/                   |  x86_64-linux-gnu




julia> Pkg.build("LibSerialPort")

INFO: Building LibSerialPort

julia> 

julia> using LibSerialPort
ERROR: ArgumentError: LibSerialPort not found in path
 in require at ./loading.jl:233

julia> readdir(joinpath(Pkg.dir("LibSerialPort"), "deps/usr/lib"))
6-element Array{ByteString,1}:
 "libserialport.a"       
 "libserialport.la"      
 "libserialport.so"      
 "libserialport.so.0"    
 "libserialport.so.0.1.0"
 "pkgconfig"      
@chrobione
Copy link
Author

I created file ~/.juliarc.jl with the following information:

module_dir = "/home/chrobi/.julia/v0.4/LibSerialPort" # <-- Change to wherever you have LibSerialPort.jl installed
module_dir in LOAD_PATH || push!(LOAD_PATH, module_dir)

And still got the following error:

ERROR: LoadError: ArgumentError: LibSerialPort not found in path
 in require at ./loading.jl:233
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:304
 in process_options at ./client.jl:280
 in _start at ./client.jl:378
while loading /home/chrobi/workspace/imu-visualizer/imu-server.jl, in expression starting on line 3

here is some more information on folder layouts:

~/workspace/imu-visualizer $ cd ~/.julia/v0.4/
BinDeps/           Conda/             HttpServer/        MbedTLS/           Tk/
.cache/            Dates/             IJulia/            METADATA/          URIParser/
Cairo/             Docile/            ImageMagick/       Nettle/            WebSockets/
Codecs/            FileIO/            Images/            Reexport/          Winston/
Colors/            FixedPointNumbers/ ImageView/         SHA/               ZipFile/
ColorTypes/        Graphics/          IniFile/           SIUnits/           Zlib/
ColorVectorSpace/  HttpCommon/        JSON/              TestImages/        ZMQ/
Compat/            HttpParser/        LibSerialPort/     TexExtensions/ 

~/.julia/v0.4/LibSerialPort $ ls
deps  LICENSE  README.md  src  test

@chrobione
Copy link
Author

I attached the libserialport.so.0.1.0 file that I compiled on my system and the one came with the check out. I tried replacing yours with mine and same results.

I am not if this matters, but when I compiled on my machine, it put the .so file in /usr/local/lib and not /usr/lib as like in the folder layout.

Cheers

libserialportfiles.zip

@andrewadare
Copy link
Contributor

I think you've built two copies of the library. You don't want the system-wide installation in /usr/local/lib, just the one produced by Pkg.build(). Can you do the following things?

  • Run make uninstall wherever you manually built libserialport from source to remove the .so from /usr/local.
  • Make sure you have the latest version of this package (do Pkg.rm and Pkg.clone if necessary)
  • Rebuild using Pkg.build.

Also, can you post the output of versioninfo()?

@andrewadare
Copy link
Contributor

This is what I developed the package on:

julia> versioninfo()
Julia Version 0.4.3
Commit a2f713d (2016-01-12 21:37 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

@chrobione
Copy link
Author

Julia Version 0.4.2
Commit bb73f34 (2015-12-06 21:47 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
  WORD_SIZE: 64
  BLAS: libopenblas (NO_LAPACK NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

It looks like I am version behind, but I used strace:

strace julia imu-server.jl

I don't have the return but basically the reason it could not find it was looking for
"src/LibSerialPort.jl" and all that was in the directory was "src/libserialport.jl"

I forked and renamed the libserialport.jl to LibSerialPort.jl and it came to life asking to feed it port info.

@andrewadare
Copy link
Contributor

Well, I believe OSX has the rather crappy feature that it reads filesystem paths case-insensitively, and Linux does it the right way. Could that be the issue? They've dealt with it in this PR. If you are feeling adventurous, you could test by updating Julia to a recent master. In the meantime, I will investigate what I can do on my end.

@chrobione
Copy link
Author

I will update my Julia to the current github master, and will report back.

I did fork your repo, and changed the file to camel case and life did get
better.

Cheers
Chrobi

On Sat, Mar 19, 2016 at 9:05 PM, Andrew Adare notifications@github.com
wrote:

Well, I believe OSX has the rather crappy feature that it reads filesystem
paths case-insensitively, and Linux does it the right way. Could that be
the issue? They've dealt with it in this PR
JuliaLang/julia#13542. If you are feeling
adventurous, you could test by updating Julia to a recent master. In the
meantime, I will investigate what I can do on my end.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1 (comment)

@andrewadare
Copy link
Contributor

I finally got to test this on a Linux machine and reproduced the issue. Should be fixed by 6c038d0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants