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

Tricky glib find on Ubuntu 18.04, Pkg.build("LCMCore") fails #42

Open
dehann opened this issue Jul 8, 2018 · 9 comments
Open

Tricky glib find on Ubuntu 18.04, Pkg.build("LCMCore") fails #42

dehann opened this issue Jul 8, 2018 · 9 comments

Comments

@dehann
Copy link
Member

dehann commented Jul 8, 2018

Hi,

We had a little trouble with getting LCMCore to buildon 18.04. Turns out it was a simple fix:

sudo apt-get install libglib2.0-dev

Not sure if the dev package is needed, but that worked for me.

cc @GearsAD

dehann added a commit that referenced this issue Jul 8, 2018
@rdeits
Copy link
Collaborator

rdeits commented Jul 8, 2018

Hm, that's strange. I've built this on 18.04 without issue. glib is also explicitly marked as a dependency here:

glib = library_dependency("glib", aliases=["libglib-2.0-0", "libglib-2.0", "libglib-2.0.so.0"], depends=[python], validate=cflags_validator("glib-2.0"))
and we have an automated built step to install libglib2.0-dev from apt here:
provides(AptGet, Dict("python-dev" => python, "libglib2.0-dev" => glib))
so it shouldn't be necessary to install it manually. Do you have a log of the original build error?

@rdeits
Copy link
Collaborator

rdeits commented Aug 24, 2018

Any updates on this? I noticed your PR #43 is still open, and I want to make sure I'm not just ignoring it 🙂

@FishAres
Copy link

Same on Windows:

┌ Error: Error building LCMCore: │ ERROR: LoadError: None of the selected providers can install dependency glib. │ Use BinDeps.debug(package_name) to see available providers │ │ Stacktrace: │ [1] error(::String) at .\error.jl:33 │ [2] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\ares.julia\packages\BinDeps\ZEval\src\dependencies.jl:949 │ [3] satisfy!(::BinDeps.LibraryDependency) at C:\Users\ares.julia\packages\BinDeps\ZEval\src\dependencies.jl:922 │ [4] top-level scope at C:\Users\ares.julia\packages\BinDeps\ZEval\src\dependencies.jl:977 │ [5] include at .\boot.jl:317 [inlined] │ [6] include_relative(::Module, ::String) at .\loading.jl:1038 │ [7] include(::Module, ::String) at .\sysimg.jl:29 │ [8] include(::String) at .\client.jl:398 │ [9] top-level scope at none:0 │ in expression starting at C:\Users\ares.julia\packages\LCMCore\g3weP\deps\build.jl:71 └ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\Operations.jl:1068

@rdeits
Copy link
Collaborator

rdeits commented Aug 27, 2018

Yeah, Windows is known not to work. See also: #2

The right solution would be to use https://github.com/JuliaPackaging/BinaryBuilder.jl to provide LCM binaries and be done with it. I'm afraid I don't have time to do that now, though.

@Affie
Copy link
Member

Affie commented Nov 21, 2018

Just to confirm the build issue on a fresh ubunu 18.04 installation, manually installing with sudo apt-get install libglib2.0-dev worked.
Error: Error building LCMCore:
│ -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7
│ -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7
│ Package glib-2.0 was not found in the pkg-config search path.
│ Perhaps you should add the directory containing glib-2.0.pc' │ to the PKG_CONFIG_PATH environment variable │ No package 'glib-2.0' found │ Package glib-2.0 was not found in the pkg-config search path. │ Perhaps you should add the directory containing glib-2.0.pc'
│ to the PKG_CONFIG_PATH environment variable
│ No package 'glib-2.0' found
│ Package glib-2.0 was not found in the pkg-config search path.
│ Perhaps you should add the directory containing `glib-2.0.pc'
│ to the PKG_CONFIG_PATH environment variable
│ No package 'glib-2.0' found
│ ERROR: LoadError: Will not force apt-get to rebuild dependency "glib".
│ Please make any necessary adjustments manually (This might just be a version upgrade)

@rdeits
Copy link
Collaborator

rdeits commented Nov 23, 2018

This continues to confuse me. I've still never seen the issue on any of my machines, but it's clearly happening. I've merged #43 since it seems prudent to help future users avoid the problem.

If you want to help debug whatever the underlying issue is, I'd be very interested to see what:

using BinDeps
BinDeps.debug("LCMCore")

reports (without manually installing libglib).

BTW, on 1.0 you'll need JuliaPackaging/BinDeps.jl#389 to get BinDeps.debug working.

@dehann
Copy link
Member Author

dehann commented Nov 24, 2018

Hi @rdeits, ah sorry -- just came across this now again. I have not seen this problem again myself. Also not seeing this on many Travis and JuliaCIBot tests. We just heard that this was an issue again recently (cc @jim-hill-r). Maybe keep the issue open for a little while more as people move from 16.04 up to 18.04? I will check this again when I have a fresh system to test on.

@rdeits
Copy link
Collaborator

rdeits commented Nov 25, 2018

Sure, no problem. It might be time for me to try the BinaryBuilder approach again, too.

@Affie
Copy link
Member

Affie commented Feb 26, 2019

Hi, I ran into this again, but with a slightly different error.
The output of BinDeps.debug("LCMCore")
The package declares 2 dependencies.

  • Library "glib"
    • Providers:
      • AptGet package libglib2.0-dev
      • Yum package glib (can't provide)
  • Library "lcm"
    • Providers:
      • CMakeWrapper.CMakeProcess(nothing, Dict{Any,Any}(:cmake_args=>["-DCMAKE_BUILD_TYPE=Release", "-DLCM_ENABLE_TESTS:BOOL=OFF", "-DLCM_ENABLE_EXAMPLES:BOOL=OFF", "-DLCM_ENABLE_JAVA:BOOL=OFF", "-DLCM_ENABLE_LUA:BOOL=OFF"]))

build LCMCore gives this error:
┌ Error: Error building LCMCore:
│ ERROR: LoadError: Will not force apt-get to rebuild dependency "glib".
│ Please make any necessary adjustments manually (This might just be a version upgrade)
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] generate_steps(::BinDeps.LibraryDependency, ::AptGet, ::Dict{Symbol,Any}) at /home/johan/.julia/dev/BinDeps/src/dependencies.jl:448
│ [3] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at /home/johan/.julia/dev/BinDeps/src/dependencies.jl:944
│ [4] satisfy!(::BinDeps.LibraryDependency) at /home/johan/.julia/dev/BinDeps/src/dependencies.jl:922
│ [5] top-level scope at /home/johan/.julia/dev/BinDeps/src/dependencies.jl:977
│ [6] include at ./boot.jl:317 [inlined]
│ [7] include_relative(::Module, ::String) at ./loading.jl:1044
│ [8] include(::Module, ::String) at ./sysimg.jl:29
│ [9] include(::String) at ./client.jl:392
│ [10] top-level scope at none:0
│ in expression starting at /home/johan/.julia/packages/LCMCore/OjPCv/deps/build.jl:70
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1097

After manual apt install libglib2.0-dev (if it helps):
The package declares 2 dependencies.
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include

  • Library "glib"
    • Satisfied by:
      • AptGet package libglib2.0-dev at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      • AptGet package libglib2.0-dev at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    • Providers:
      • AptGet package libglib2.0-dev
      • Yum package glib (can't provide)
  • Library "lcm"
    • Providers:
      • CMakeWrapper.CMakeProcess(nothing, Dict{Any,Any}(:cmake_args=>["-DCMAKE_BUILD_TYPE=Release", "-DLCM_ENABLE_TESTS:BOOL=OFF", "-DLCM_ENABLE_EXAMPLES:BOOL=OFF", "-DLCM_ENABLE_JAVA:BOOL=OFF", "-DLCM_ENABLE_LUA:BOOL=OFF"]))

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

4 participants