Open Sid-Bhatia-0 opened 2 years ago
Well, the first step is to update the jll in Yggdrasil, and then test this package with the new jll for API breakages.
Ok. I have a few more follow up questions on that:
MiniFB.jl
? I believe there are some bug fixes that have occurred since the last time this package was update (eg. https://github.com/emoon/minifb/commit/0e493a73b43440fd822e5e7705a868e880c54510). Would it be a good idea to update this package right now?Yes. If you see the minifb build file ( https://github.com/JuliaPackaging/Yggdrasil/blob/master/M/MiniFB/build_tarballs.jl) on yggdrasil right now, we just refer to the master when it was last updated.
Yeah, sure. Why not.
Yeah, that sounds about right.
On Sat, 19 Feb 2022, 06:53 Siddharth Bhatia, @.***> wrote:
Ok. I have a few more follow up questions on that:
- I don't see any version releases on minifb repository https://github.com/emoon/minifb. Do we just take the current master branch?
- What would be a good time to update the jll and MiniFB.jl? I believe there are some bug fixes that have occurred since the last time this package was update (eg. @.*** https://github.com/emoon/minifb/commit/0e493a73b43440fd822e5e7705a868e880c54510). Would it be a good idea to update this package right now?
- Since there are no automated tests, would it be okay to just test the examples (with more examples added over time) on the different platforms (Windows, macOS, Linux)? I can help with testing on Linux (I am using Manjaro Linux), if needed.
— Reply to this email directly, view it on GitHub https://github.com/aviks/MiniFB.jl/issues/16#issuecomment-1045903957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC4QJTXKFOFYUFUBOCQLBDU3446RANCNFSM5OVNKNEQ . You are receiving this because you commented.Message ID: <aviks/MiniFB. @.***>
Great! Thanks.
Hi @aviks . I am trying to create a tarball for my host platform with the latest minifb commit using the following script:
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg
name = "MiniFB"
version = v"0.2.0"
# Collection of sources required to complete build
sources = [
GitSource("https://github.com/emoon/minifb.git", "5066489cd81b23b0c79952f7d6f464b20c54867c") #master as of 24Feb2022
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/minifb/
sed -i -e 's/add_library(minifb STATIC/add_library(minifb SHARED/' \
-e 's/ -Wall/-I$ENV{includedir} -Wall/' \
CMakeLists.txt
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DMINIFB_BUILD_EXAMPLES=OFF \
..
make -j${nproc}
mv libminifb* ${libdir}
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
# platforms = supported_platforms()
platforms = [HostPlatform()]
# The products that we will ensure are always built
products = [
LibraryProduct("libminifb", :libminifb)
]
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="Xorg_libX11_jll", uuid="4f6342f7-b3d2-589e-9d20-edeb45f2b2bc"))
BuildDependency(PackageSpec(name="Xorg_xorgproto_jll", uuid="c4d99508-4286-5418-9131-c86396af500b"))
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"5.2.0")
But I am getting the following error (my guess is that it is related to some dependency that needs to be added but I don't know how to resolve it):
(add_binary) build $ julia --project=. create_tarball_for_host_platform.jl
[ Info: Building for x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1
┌ Warning: Unable to run unprivileged containers on this system! This may be because your kernel does not support mounting overlay filesystems within user namespaces. To work around this, we will switch to using privileged containers. This requires the use of sudo. To choose this automatically, set the BINARYBUILDER_RUNNER environment variable to "privileged" before starting Julia.
└ @ BinaryBuilderBase ~/.julia/packages/BinaryBuilderBase/uBipT/src/UserNSRunner.jl:97
[ Info: Running privileged container via `sudo`, may ask for your password:
[sudo] password for user:
Re-run cmake no build system arguments
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Processing MiniFB
-- Done MiniFB
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/srcdir/minifb/build
/usr/bin/cmake -S/workspace/srcdir/minifb -B/workspace/srcdir/minifb/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /workspace/srcdir/minifb/build/CMakeFiles /workspace/srcdir/minifb/build//CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/workspace/srcdir/minifb/build'
make -f CMakeFiles/minifb.dir/build.make CMakeFiles/minifb.dir/depend
make[2]: Entering directory '/workspace/srcdir/minifb/build'
cd /workspace/srcdir/minifb/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /workspace/srcdir/minifb /workspace/srcdir/minifb /workspace/srcdir/minifb/build /workspace/srcdir/minifb/build /workspace/srcdir/minifb/build/CMakeFiles/minifb.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/workspace/srcdir/minifb/build'
make -f CMakeFiles/minifb.dir/build.make CMakeFiles/minifb.dir/build
make[2]: Entering directory '/workspace/srcdir/minifb/build'
[ 12%] Building C object CMakeFiles/minifb.dir/src/MiniFB_common.c.o
[ 37%] Building C object CMakeFiles/minifb.dir/src/MiniFB_internal.c.o
[ 37%] Building CXX object CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o
/opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-gcc --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/ -DUSE_OPENGL_API -Dminifb_EXPORTS -I/workspace/srcdir/minifb/include -I/workspace/srcdir/minifb/src -fPIC -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/MiniFB_common.c.o -MF CMakeFiles/minifb.dir/src/MiniFB_common.c.o.d -o CMakeFiles/minifb.dir/src/MiniFB_common.c.o -c /workspace/srcdir/minifb/src/MiniFB_common.c
[ 50%] Building C object CMakeFiles/minifb.dir/src/MiniFB_timer.c.o
/opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-g++ --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/ -DUSE_OPENGL_API -Dminifb_EXPORTS -I/workspace/srcdir/minifb/include -I/workspace/srcdir/minifb/src -fPIC -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-cast-function-type -std=c++11 -MD -MT CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o -MF CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o.d -o CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o -c /workspace/srcdir/minifb/src/MiniFB_cpp.cpp
/opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-gcc --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/ -DUSE_OPENGL_API -Dminifb_EXPORTS -I/workspace/srcdir/minifb/include -I/workspace/srcdir/minifb/src -fPIC -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/MiniFB_internal.c.o -MF CMakeFiles/minifb.dir/src/MiniFB_internal.c.o.d -o CMakeFiles/minifb.dir/src/MiniFB_internal.c.o -c /workspace/srcdir/minifb/src/MiniFB_internal.c
/opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-gcc --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/ -DUSE_OPENGL_API -Dminifb_EXPORTS -I/workspace/srcdir/minifb/include -I/workspace/srcdir/minifb/src -fPIC -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/MiniFB_timer.c.o -MF CMakeFiles/minifb.dir/src/MiniFB_timer.c.o.d -o CMakeFiles/minifb.dir/src/MiniFB_timer.c.o -c /workspace/srcdir/minifb/src/MiniFB_timer.c
[ 62%] Building C object CMakeFiles/minifb.dir/src/gl/MiniFB_GL.c.o
/opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-gcc --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/ -DUSE_OPENGL_API -Dminifb_EXPORTS -I/workspace/srcdir/minifb/include -I/workspace/srcdir/minifb/src -fPIC -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/gl/MiniFB_GL.c.o -MF CMakeFiles/minifb.dir/src/gl/MiniFB_GL.c.o.d -o CMakeFiles/minifb.dir/src/gl/MiniFB_GL.c.o -c /workspace/srcdir/minifb/src/gl/MiniFB_GL.c
[ 75%] Building C object CMakeFiles/minifb.dir/src/x11/X11MiniFB.c.o
/opt/bin/x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1/x86_64-linux-gnu-gcc --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/ -DUSE_OPENGL_API -Dminifb_EXPORTS -I/workspace/srcdir/minifb/include -I/workspace/srcdir/minifb/src -fPIC -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/x11/X11MiniFB.c.o -MF CMakeFiles/minifb.dir/src/x11/X11MiniFB.c.o.d -o CMakeFiles/minifb.dir/src/x11/X11MiniFB.c.o -c /workspace/srcdir/minifb/src/x11/X11MiniFB.c
In file included from /workspace/srcdir/minifb/src/gl/MiniFB_GL.c:9:
/workspace/srcdir/minifb/src/x11/WindowData_X11.h:7:10: fatal error: GL/glx.h: No such file or directory
#include <GL/glx.h>
^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/minifb.dir/build.make:132: CMakeFiles/minifb.dir/src/gl/MiniFB_GL.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/workspace/srcdir/minifb/src/x11/X11MiniFB.c:11:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
#include <xkbcommon/xkbcommon.h>
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/minifb.dir/build.make:146: CMakeFiles/minifb.dir/src/x11/X11MiniFB.c.o] Error 1
make[2]: Leaving directory '/workspace/srcdir/minifb/build'
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/minifb.dir/all] Error 2
make[1]: Leaving directory '/workspace/srcdir/minifb/build'
make: *** [Makefile:91: all] Error 2
Previous command exited with 2
ERROR: LoadError: Build for MiniFB on x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx29-julia_version+1.7.1 did not complete successfully
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] autobuild(dir::AbstractString, src_name::AbstractString, src_version::VersionNumber, sources::Vector{<:BinaryBuilderBase.AbstractSource}, script::AbstractString, platforms::Vector, products::Vector{<:Product}, dependencies::Vector{<:BinaryBuilderBase.AbstractDependency}; verbose::Bool, debug::Bool, skip_audit::Bool, ignore_audit_errors::Bool, autofix::Bool, code_dir::Union{Nothing, String}, require_license::Bool, kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
@ BinaryBuilder ~/.julia/packages/BinaryBuilder/Ftk2f/src/AutoBuild.jl:839
[3] build_tarballs(ARGS::Any, src_name::Any, src_version::Any, sources::Any, script::Any, platforms::Any, products::Any, dependencies::Any; julia_compat::String, kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
@ BinaryBuilder ~/.julia/packages/BinaryBuilder/Ftk2f/src/AutoBuild.jl:321
[4] top-level scope
@ ~/projects/SimpleIMGUIExample/build/create_tarball_for_host_platform.jl:47
in expression starting at /home/user/projects/SimpleIMGUIExample/build/create_tarball_for_host_platform.jl:47
(add_binary) build $
I am using the following configuration:
julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
(build) pkg> st
Status `~/projects/SimpleIMGUIExample/build/Project.toml`
[12aac903] BinaryBuilder v0.5.2
(build) pkg>
Could you please help me out here?
Also, I was wondering if there are any updates on progress towards a newer minor release of MiniFB.jl
.
Thanks.
@Sid-Bhatia-0 see here: https://github.com/JuliaPackaging/Yggdrasil/pull/4533
Hi @aviks.
I see that the jll at https://github.com/JuliaBinaryWrappers/MiniFB_jll.jl has been updated. Can we now tag a new release for this package?
Thanks.
Actually, we do not have a compat bound for the jll in the project.toml, so if you update, you should get the new jll. We need to test if the examples all work on the new jll.
Ok. I tried a fresh install. It installs the latest jll. And all the 4 examples seem to be running on my machine.
Also, could there be a change in the API that requires modifying the files in MiniFB.jl
(either automatically or manually)?
I tried getting the Generated Code
section in docs to work but am facing some trouble (unable to add Clang@v0.13.0
and also not sure about the directory structure). Also, I think the newer Clang version has some other format for generation (maybe we should move to the newer one?). I couldn't really grasp that section of the doc, so it would be great if you could clarify that portion a little more.
Thanks.
Sorry, I missed the last comment. I don't think there are any API changes, as far as I know.
First of all, thank you for creating this wrapper package. I really like the simplicity of minifb.
On the minifb repository, I see commits in the source code that are more recent than the last release of
MiniFB.jl
.I am not familiar with how
MiniFB.jl
was created from minifb, so this is a beginner level question. I am curious to know when and how wouldMiniFB.jl
incorporate changes from the original minifb library? I saw that there is MiniFB_jll, but even over there, the last commit seems to be long back.Thanks.