Giter Club home page Giter Club logo

Comments (17)

userdocs avatar userdocs commented on May 9, 2024 1

this error does not occur in a non docker setup and i could not replicate it as a issue with the script.

It appears to possibly be a environment issue with how python is detected and passed to boost.

#14 974.2 error: "3.8" is not a known value of feature <python>

Regarding this file generation command:

https://github.com/userdocs/qbittorrent-nox-static/blob/master/qbittorrent-nox-static-musl.sh#L203

As to why, i cannot say. maybe try without --no-delete

from qbittorrent-nox-static.

userdocs avatar userdocs commented on May 9, 2024 1

Then you should use the all switch per build and not skip any modules.

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

removing --no-delete didn't fix it, I'm going to try and experiment with the script (specifically the line you mention) in an alpine container see if I can find the issue

from qbittorrent-nox-static.

userdocs avatar userdocs commented on May 9, 2024

Run the script on alpine non docker vps and see what happens.

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

Run the script on alpine non docker vps and see what happens.

Yep, I tested the script on a scaleway Alpine Linux 3.7.0 VPS running python 3.8 and it worked, something's off about the docker container, I will continue investigating

from qbittorrent-nox-static.

userdocs avatar userdocs commented on May 9, 2024

The jam file creation before is how I tell boost which python to use. Can you check the contents of that file on error please.

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

ah! found the issue!

https://github.com/userdocs/qbittorrent-nox-static/blob/master/qbittorrent-nox-static-musl.sh#L203

[[ "$1" =~ $modules ]] && { mkdir -p "$install_dir"; echo 'using python : '"$python_short_version"' : /usr/bin/python'"$python_short_version"' : /usr/include/python'"$python_short_version"' : /usr/lib/python'"$python_short_version"' ;' > user-config.jam; }

creates the user-config.jam file (with the correct content) in the current directory and I was running the script from / as opposed to ~ should the line instead be? :

[[ "$1" =~ $modules ]] && { mkdir -p "$install_dir"; echo 'using python : '"$python_short_version"' : /usr/bin/python'"$python_short_version"' : /usr/include/python'"$python_short_version"' : /usr/lib/python'"$python_short_version"' ;' > $HOME/user-config.jam; }

edit: notice the > $HOME/user-config.jam; at the end

from qbittorrent-nox-static.

userdocs avatar userdocs commented on May 9, 2024

It would make sense. There is no reason to not have $HOME prefixed to that file path creation. To be honest I am not sure why it is not already there. If that fixes it i can update the scripts.

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

edit: never mind this was just me forgetting to build all modules instead of just boost

seems to fix it, although I'm getting another error but its probably something else (I'm looking into it):

#12 1030. Submodule path 'tools/quickbook': checked out '944f760cc2decfe745540f019cad078a57a27337'
#12 1030. Building Boost.Build engine with toolset gcc... tools/build/src/engine/b2
#12 1039. Unicode/ICU support for Boost.Regex?... not found.
#12 1039. Generating Boost.Build configuration in project-config.jam for gcc...
#12 1039. 
#12 1039. Bootstrapping is done. To build, run:
#12 1039. 
#12 1039.     ./b2
#12 1039.     
#12 1039. To generate header files, run:
#12 1039. 
#12 1039.     ./b2 headers
#12 1039. 
#12 1039. To adjust configuration, edit 'project-config.jam'.
#12 1039. Further information:
#12 1039. 
#12 1039.    - Command line help:
#12 1039.      ./b2 --help
#12 1039.      
#12 1039.    - Getting started guide: 
#12 1039.      http://www.boost.org/more/getting_started/unix-variants.html
#12 1039.      
#12 1039.    - Boost.Build documentation:
#12 1039.      http://www.boost.org/build/
#12 1039. 
#12 1039. ./qbittorrent-nox-static-musl.sh: line 364: /root/qbittorrent-build/bin/b2: No such file or directory

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

here's a PR for the fix: #6 :)

from qbittorrent-nox-static.

userdocs avatar userdocs commented on May 9, 2024

So that is this line https://github.com/userdocs/qbittorrent-nox-static/blob/master/qbittorrent-nox-static-musl.sh#L364

Specifically this part "$install_dir/bin/b2" which i can see is expanded as /root/qbittorrent-build/bin/b2

I'd look to the previous module where boost build is created and installed. Was there an error? is it installed to the right place?

This all seems to related to environment issues specific to the docker scenario.

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

So that is this line https://github.com/userdocs/qbittorrent-nox-static/blob/master/qbittorrent-nox-static-musl.sh#L364

Specifically this part "$install_dir/bin/b2" which i can see is expanded as /root/qbittorrent-build/bin/b2

I'd look to the previous module where boost build is created and installed. Was there an error? is it installed to the right place?

This all seems to related to environment issues specific to the docker scenario.

yep this was my fault, I was not building all modules just boost so it was failing because it needs boost_build to be built before

from qbittorrent-nox-static.

userdocs avatar userdocs commented on May 9, 2024

To build quickly you would need to install qt and boost via apk. Otherwise it just takes a while. You would probably need alpine edge as well.

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

To build quickly you would need to install qt and boost via apk. Otherwise it just takes a while. You would probably need alpine edge as well.

Will the final binary be fully static if I do that? I am aiming to make a distroless docker container in which I won't be able to install any dependencies

from qbittorrent-nox-static.

userdocs avatar userdocs commented on May 9, 2024

No but perhaps I am not understanding the process. How does the end user acquire the binary. So they have to build it everytime or are you providing the binary via another medium?

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

The idea is to build a static qbittorrent binary every time qbittorrent is updated then embed that binary in a distroless docker image then publish it to the docker hub like the one I currently use (alpine linux based, but not distroless)

edit: I got this idea when I noticed that some qbittorrent builds have a memory leak, and for some reason, not your binary

from qbittorrent-nox-static.

guillaumedsde avatar guillaumedsde commented on May 9, 2024

cheers, thanks for the help :)

from qbittorrent-nox-static.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.