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

Nice to get libsndfile into BB #107

Closed
ViralBShah opened this issue Sep 30, 2019 · 8 comments
Closed

Nice to get libsndfile into BB #107

ViralBShah opened this issue Sep 30, 2019 · 8 comments
Labels
builder request 🙏 Request for a new builder multimedia 🎧 Issues and builders related to multimedia libraries

Comments

@ViralBShah
Copy link
Member

It would be nice to have libsndfile packaged up for serving through the BB infrastructure.

@giordano
Copy link
Member

giordano commented Oct 5, 2019

I see that among its dependencies there are libogg (already in Yggdrasil) and libvorbis (in #88)

@giordano giordano added builder request 🙏 Request for a new builder multimedia 🎧 Issues and builders related to multimedia libraries labels Oct 7, 2019
@haberdashPI
Copy link
Contributor

I'm interested in fixing #20 from LibSndFile.jl. I'm working on closing #88, and then will add PR's for FLAC (a dep of libsndfile) and libsndfile.

@ViralBShah
Copy link
Member Author

That would be awesome!

@haberdashPI
Copy link
Contributor

I need a little help figuring out how to use BinaryBuilder to create a build_tarballs.jl for FLAC. I thought I understood what to do, but now that I'm trying it, I'm running into issues. I'm on Mac OSX, running BB via docker with this image. When it asks me for a binary dependency for FLAC I give it the link to Ogg's binaries in Yggdrasil via this link. I get a method error during what looks like the reading of the Ogg depedency:

LoadError: MethodError: no method matching LibraryProduct(::String, ::Symbol)
Closest candidates are:
  LibraryProduct(::AbstractString, ::AbstractString, ::Symbol) at /root/.julia/packages/BinaryProvider/lWyQJ/src/Products.jl:101
  LibraryProduct(::AbstractString, ::Array{S<:AbstractString,1}, ::Symbol) where S<:AbstractString at /root/.julia/packages/BinaryProvider/lWyQJ/src/Products.jl:106

I saw a similar (possibly the same?) error before I updated BB to the latest master via ]up. The full output is below. What am I missing?

(v1.0) pkg> status
    Status `~/.julia/environments/v1.0/Project.toml`
  [12aac903] BinaryBuilder v0.1.4 #master (https://github.com/JuliaPackaging/BinaryBuilder.jl.git)
  [b99e7846] BinaryProvider v0.5.5 #master (https://github.com/JuliaPackaging/BinaryProvider.jl.git)

julia> using BinaryBuilder; BinaryBuilder.run_wizard()
[ Info: Recompiling stale cache file /root/.julia/compiled/v1.0/BinaryBuilder/WHzgM.ji for BinaryBuilder [12aac903-9f7c-5d81-afc2-d9565ea332ae]

        o      `.
       o*o      \'-_                 00000000: 01111111  .
         \\      \;"".     ,;.--*    00000001: 01000101  E
          \\     ,\''--.--'/         00000003: 01001100  L
          :=\--<' `""  _   |         00000003: 01000110  F
          ||\\     `" / ''--         00000004: 00000010  .
          `/_\\,-|    |              00000005: 00000001  .
              \\/     L
               \\ ,'   \
             _/ L'   `  \
            /  /    /   /          Julia Binzard
           /  /    |    \          JuliaPackaging/BinaryBuilder.jl
          "_''--_-''---__=;

Welcome to the BinaryBuilder wizard.
We'll get you set up in no time.

			# Step 1: Select your platforms

Make a platform selection
 > All supported architectures
   Specific operating system
   Specific architecture
   Custom


			# Step 2a: Obtain the source code

Please enter a URL (git repository or compressed archive) containing the source code to build:
> https://downloads.xiph.org/releases/flac/flac-1.3.3.tar.xz

[14:30:01] ######################################################################## 100.0%

Would you like to download additional sources?  [y/N]: N

			# Step 2b: Obtain binary dependencies (if any)

Do you require any (binary) dependencies?  [y/N]: y
How would you like to specify this dependency?
 > Provide remote build.jl file
   Paste in a build.jl file
   Never mind

Enter the URL to use:
> https://github.com/JuliaPackaging/Yggdrasil/blob/master/O/Ogg/build_tarballs.jl

The entered URL has been canonicalized to
https://raw.githubusercontent.com/JuliaPackaging/Yggdrasil/a2ddcf4c906fc24e2ad95b1e6ec323ed28a767fa/O/Ogg/build_tarballs.jl

Would you like to provide additional dependencies?  [y/N]: N

			# Step 3: Build for Linux(:x86_64, libc=:glibc)

You will now be dropped into the cross-compilation environment.
Please compile the library. Your initial compilation target is Linux(:x86_64, libc=:glibc).
The $prefix environment variable contains the target directory.
Once you are done, exit by typing `exit` or `^D`

LoadError: MethodError: no method matching LibraryProduct(::String, ::Symbol)
Closest candidates are:
  LibraryProduct(::AbstractString, ::AbstractString, ::Symbol) at /root/.julia/packages/BinaryProvider/lWyQJ/src/Products.jl:101
  LibraryProduct(::AbstractString, ::Array{S<:AbstractString,1}, ::Symbol) where S<:AbstractString at /root/.julia/packages/BinaryProvider/lWyQJ/src/Products.jl:106
Stacktrace:
 [1] top-level scope at none:0
 [2] include_string(::Module, ::String, ::String) at ./loading.jl:1008
 [3] include_string at ./loading.jl:1012 [inlined]
 [4] #setup_workspace#228(::Bool, ::Base.TTY, ::Nothing, ::Function, ::String, ::Array{String,1}, ::Array{String,1}, ::Array{BinaryBuilder.AbstractDependency,1}, ::Linux, ::Dict{String,String}) at /root/.julia/packages/BinaryBuilder/Rtp9p/src/wizard/utils.jl:294
 [5] #setup_workspace at ./none:0 [inlined] (repeats 2 times)
 [6] (::getfield(BinaryBuilder, Symbol("##275#276")){BinaryBuilder.WizardState,Linux,String})() at /root/.julia/packages/BinaryBuilder/Rtp9p/src/wizard/interactive_build.jl:285
 [7] cd(::getfield(BinaryBuilder, Symbol("##275#276")){BinaryBuilder.WizardState,Linux,String}, ::String) at ./file.jl:96
 [8] step34(::BinaryBuilder.WizardState) at /root/.julia/packages/BinaryBuilder/Rtp9p/src/wizard/interactive_build.jl:284
 [9] run_wizard(::Nothing) at /root/.julia/packages/BinaryBuilder/Rtp9p/src/Wizard.jl:88
 [10] run_wizard() at /root/.julia/packages/BinaryBuilder/Rtp9p/src/Wizard.jl:63
 [11] top-level scope at none:0
 [12] eval(::Module, ::Any) at ./boot.jl:319
 [13] eval_user_input(::Any, ::REPL.REPLBackend) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85
 [14] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined]
 [15] (::getfield(REPL, Symbol("##28#29")){REPL.REPLBackend})() at ./task.jl:259
in expression starting at string:26

WizardState [step3]

@ssfrr
Copy link
Contributor

ssfrr commented Oct 23, 2019

Thanks for looking into this! Also pinging @jpsamaroo who's done some work on BB support for PortAudio.jl

@giordano
Copy link
Member

For binary dependencies, you should pass a build.jl file, not a build_tarballs.jl. This former is generated by the latter, and tells BinaryProvider how to fetch the necessary tarballs. I couldn't find any build.jl file for Ogg here in Yggdrasil, as a workaround you can use https://github.com/JuliaIO/OggBuilder/releases/download/v1.3.3-7/build_Ogg.v1.3.3.jl.

However, note that things are quite in flux in BinaryBuilder recently, it is going under a major overhaul (see JuliaPackaging/BinaryBuilder.jl#441). It'd be great just if you could provide a basic, even untested, build_tarballs.jl for FLAC that we can fix later on.

This was referenced Oct 24, 2019
@haberdashPI
Copy link
Contributor

I think that's all set. Looking forward to benefitting from this new Artifact system, it looks great!!

@giordano
Copy link
Member

I think all necessary packages have been built and this ticket can now be closed, right? Thank you so much @haberdashPI for the help!

Let us know if you need more package or have any problem using the binaries 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder request 🙏 Request for a new builder multimedia 🎧 Issues and builders related to multimedia libraries
Projects
None yet
Development

No branches or pull requests

4 participants