wildart/FLANN.jl

Error Building FLANN on Elementary OS

apetridis opened this issue · 8 comments

Hi,
I'm trying to build flann but i am encountering some problems:

(@v1.6) pkg> build FLANN
    Building FLANN → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/5e69a6f74abee6660ad11458f7eea5817604ef44/build.log`
ERROR: Error building `FLANN`: 
patching file src/flann-1.9.1/src/cpp/CMakeLists.txt
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file src/flann-1.9.1/src/cpp/CMakeLists.txt.rej
[ Info: Attempting to create directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/downloads
[ Info: Directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/downloads already exists
[ Info: Downloading file https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz
[ Info: Done downloading file https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz
[ Info: Attempting to create directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/src
[ Info: Directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/src already exists
[ Info: Attempting to create directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps
[ Info: Directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps already exists
[ Info: Path /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/src/flann-1.9.1 already exists
[ Info: Attempting to create directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/builds/1.9.1
[ Info: Directory /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/builds/1.9.1 already exists
ERROR: LoadError: failed process: Process(`patch src/flann-1.9.1/src/cpp/CMakeLists.txt patch-flann-1.9.1.txt`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:525 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:440
 [3] run(::Cmd)
   @ Base ./process.jl:438
 [4] run(s::BinDeps.SynchronousStepCollection)
   @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/BinDeps.jl:524
 [5] satisfy!(dep::BinDeps.LibraryDependency, methods::Vector{DataType})
   @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:951
 [6] satisfy!(dep::BinDeps.LibraryDependency)
   @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:929
 [7] top-level scope
   @ ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:984
 [8] include(fname::String)
   @ Base.MainInclude ./client.jl:444
 [9] top-level scope
   @ none:5
in expression starting at /home/alepetpan/.julia/packages/FLANN/a7m6V/deps/build.jl:49

I am running

Julia Version 1.6.3
Commit ae8452a9e0 (2021-09-23 17:34 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, haswell)

Τhank you very much in advance.

Same problem on my Windows, and with ubuntu 21.10 live cd

Same on Mac:

Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, westmere)

Could you provide the build log from the corresponding scratchspace?

Can you walk me through on how to do this ?

This is an excerpt of your log

(@v1.6) pkg> build FLANN
    Building FLANN → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/5e69a6f74abee6660ad11458f7eea5817604ef44/build.log`

~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/5e69a6f74abee6660ad11458f7eea5817604ef44/ is the path to the build log location.

I also would recommend uninstall the package and run the package manager GC, i.e. ] gc. Then, try to install again.

I think I'm having the same issue on Julia v1.7, tried uninstalling and running GC as suggested and hit same issue. The log readout is pasted below, I'm on a linux-based cluster but hit the same issue on my macbook (Intel, not M1) and in both cases loaded cmake just in case that was the problem, but no luck. Also, running FLANN v1.1.0, tried FLANN#master but hit the same issue it seems.

Any help is certainly appreciated, thank you!

patching file src/flann-1.9.1/src/cpp/CMakeLists.txt                                                                                                                                                                                                                              
 Reversed (or previously applied) patch detected!  Assume -R? [n]                                                                                                                                                                                                                  
 Apply anyway? [n]                                                                                                                                                                                                                                                                 
 Skipping patch.                                                                                                                                                                                                                                                                   
 2 out of 2 hunks ignored -- saving rejects to file src/flann-1.9.1/src/cpp/CMakeLists.txt.rej                                                                                                                                                                                     
 [ Info: Attempting to create directory ~/.julia/packages/FLANN/a7m6V/deps/downloads                                                                                                                                                                                               
 [ Info: Directory ~/.julia/packages/FLANN/a7m6V/deps/downloads already exists                                                                                                                                                                                                     
 [ Info: Downloading file https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz                                                                                                                                                                                                 
 [ Info: Done downloading file https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz                                                                                                                                                                                            
 [ Info: Attempting to create directory ~/.julia/packages/FLANN/a7m6V/deps/src                                                                                                                                                                                                     
 [ Info: Directory ~/.julia/packages/FLANN/a7m6V/deps/src already exists                                                                                                                                                                                                            [ Info: Attempting to create directory ~/.julia/packages/FLANN/a7m6V/deps                                                                                                                                                                                                         
 [ Info: Directory ~/.julia/packages/FLANN/a7m6V/deps already exists                                                                                                                                                                                                               
 [ Info: Path ~/.julia/packages/FLANN/a7m6V/deps/src/flann-1.9.1 already exists                                                                                                                                                                                                    
 [ Info: Attempting to create directory ~/.julia/packages/FLANN/a7m6V/deps/builds/1.9.1                                                                                                                                                                                            
 [ Info: Directory ~/.julia/packages/FLANN/a7m6V/deps/builds/1.9.1 already exists                                                                                                                                                                                                  
 ERROR: LoadError: failed process: Process(`patch src/flann-1.9.1/src/cpp/CMakeLists.txt patch-flann-1.9.1.txt`, ProcessExited(1)) [1]                                                                                                                                                                                                                                                                                                                                                                                                                                 Stacktrace:                                                                                                                                                                                                                                                                         [1] pipeline_error                                                                                                                                                                                                                                                                   @ ./process.jl:531 [inlined]                                                                                                                                                                                                                                                     [2] run(::Cmd; wait::Bool)                                                                                                                                                                                                                                                           @ Base ./process.jl:446                                                                                                                                                                                                                                                          [3] run(::Cmd)                                                                                                                                                                                                                                                                   
    @ Base ./process.jl:444                                                                                                                                                                                                                                                        
  [4] run(s::BinDeps.SynchronousStepCollection)                                                                                                                                                                                                                                    
    @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/BinDeps.jl:524                                                                                                                                                                                                                   
  [5] satisfy!(dep::BinDeps.LibraryDependency, methods::Vector{DataType})                                                                                                                                                                                                          
    @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:951                                                                                                                                                                                                              
  [6] satisfy!(dep::BinDeps.LibraryDependency)                                                                                                                                                                                                                                     
    @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:929 
 [7] top-level scope                                                                                                                                                                                                                                                              
    @ ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:984                                                                                                                                                                                                                      
  [8] include(fname::String)                                                                                                                                                                                                                                                       
    @ Base.MainInclude ./client.jl:451                                                                                                                                                                                                                                             
  [9] top-level scope                                                                                                                                                                                                                                                              
    @ none:5                                                                                                                                                                                                                                                                       
 in expression starting at ~/.julia/packages/FLANN/a7m6V/deps/build.jl:49    

Please try to install from master.

Hi, I'm still having the same issue on Ubuntu.

Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

Building from master does not solve the issue.

Here is the stacktrace that I obtain after pkg> build FLANN

patching file src/flann-1.9.1/src/cpp/CMakeLists.txt
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file src/flann-1.9.1/src/cpp/CMakeLists.txt.rej
[ Info: Attempting to create directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/downloads
[ Info: Directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/downloads already exists
[ Info: Downloading file https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz
[ Info: Done downloading file https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz
[ Info: Attempting to create directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/src
[ Info: Directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/src already exists
[ Info: Attempting to create directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps
[ Info: Directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps already exists
[ Info: Path /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/src/flann-1.9.1 already exists
[ Info: Attempting to create directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/builds/1.9.1
[ Info: Directory /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/builds/1.9.1 already exists
ERROR: LoadError: failed process: Process(`patch src/flann-1.9.1/src/cpp/CMakeLists.txt patch-flann-1.9.1.txt`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:540 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:455
 [3] run(::Cmd)
   @ Base ./process.jl:453
 [4] run(s::BinDeps.SynchronousStepCollection)
   @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/BinDeps.jl:524
 [5] satisfy!(dep::BinDeps.LibraryDependency, methods::Vector{DataType})
   @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:951
 [6] satisfy!(dep::BinDeps.LibraryDependency)
   @ BinDeps ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:929
 [7] top-level scope
   @ ~/.julia/packages/BinDeps/5xsHU/src/dependencies.jl:984
 [8] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [9] top-level scope
   @ none:5
in expression starting at /home/kydlaw/.julia/packages/FLANN/a7m6V/deps/build.jl:49