-
Notifications
You must be signed in to change notification settings - Fork 561
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
New recipe: MEOS #9453
base: master
Are you sure you want to change the base?
New recipe: MEOS #9453
Changes from 11 commits
ce1f2b1
aa09bf5
c5723a1
89c3526
a19de81
62c27c5
0a9ef76
5da9f1e
d84d2da
aaa0af6
f90c20d
7388a6c
2794d96
29356c3
69f866f
0597eb5
8701da0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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 = "MEOS" | ||
version = v"1.2.0" | ||
|
||
# MEOS (Mobility Engine, Open Source) is a standalone C library and the core component of MobilityDB. | ||
# For further information, see https://libmeos.org | ||
sources = [ | ||
GitSource("https://github.com/MobilityDB/MobilityDB.git", "60048b5b4b7ce2f7560c024d1af024db73b3bd5b") | ||
] | ||
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
cd $WORKSPACE/srcdir/MobilityDB | ||
|
||
cmake -B build \ | ||
-DCMAKE_INSTALL_PREFIX=${prefix} \ | ||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DMEOS=ON \ | ||
-DHAVE_X86_64_POPCNTQ_EXITCODE="FAILED_TO_RUN" \ | ||
-DHAVE_X86_64_POPCNTQ_EXITCODE__TRYRUN_OUTPUT= | ||
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? This is such an old instruction which should be moderately safe to assume to be available. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently it's not the instruction, but the TRY_RUN statement is not allowed in cross-compile mode:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I know. But I expect that try-run is running a check whether the instruction is available. Which of course could also be done with a simple compiler check instead of a try-run. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just workarounded the error with the instruction CMake gave me (I'm not affiliated with MobilityDB/MEOS so I can't answer the why, but I'm happy to make an upstream issue). AFAIK there's no code in MEOS actually making use of this check (anymore MobilityDB/MobilityDB#610). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use a cross-compilation environment, so any try_run call in a CMake script will basically be pointless. From the CMake docs (https://cmake.org/cmake/help/latest/command/try_run.html#behavior-when-cross-compiling):
|
||
cmake --build build --parallel ${nproc} | ||
cmake --install build | ||
""" | ||
|
||
# These are the platforms we will build for by default, unless further | ||
# platforms are passed in on the command line | ||
platforms = expand_cxxstring_abis(supported_platforms()) | ||
filter!(x -> arch(x) != "i686", platforms) # __int128 not supported on i686 | ||
filter!(x -> !startswith(arch(x), "armv"), platforms) # __int128 not supported on armv | ||
filter!(!=(Platform("aarch64", "freebsd")), platforms) # Misses most dependencies | ||
|
||
# The products that we will ensure are always built | ||
products = [ | ||
LibraryProduct("libmeos", :libmeos) | ||
] | ||
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
Dependency(PackageSpec(name="GEOS_jll", uuid="d604d12d-fa86-5845-992e-78dc15976526")) | ||
Dependency(PackageSpec(name="JSON_C_jll", uuid="9cdfc4e7-e793-5089-b6f7-569a57a60f0a")) | ||
Dependency(PackageSpec(name="PROJ_jll", uuid="58948b4f-47e0-5654-a9ad-f609743f8632")) | ||
evetion marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Dependency(PackageSpec(name="GSL_jll", uuid="1b77fbbe-d8ee-58f0-85f9-836ddc23a7a4"); compat="~2.7.2") | ||
] | ||
|
||
# Build the tarballs, and possibly a `build.jl` as well. | ||
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version=v"8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused: why is the recipe called MEOS build it builds a project called "MobilityDB". I just went to https://github.com/MobilityDB/MobilityDB and it doesn't mention "MEOS" in the README.md (though there is a subdirectory called
meos
).So is MEOS a subset of MobilityDB? But building MobilityDB for some reason... only builds and installs MEOS, not the whole thing?
Perhaps it would be good to add a few comments to explain the situation? Or rename this recipe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's explained in the PR description (and on the linked website). I will add a similar comment with the link to the source here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mobility Engine Open Source" also does not seem to be the obvious search hit for "MeOS" on Google.
Recommendation: Choose a longer, more explicit name, e.g.,
MobilityEngineOpenSource
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that Google doesn't help (right now), but I'm not sure if that's a good requirement? Eigen, much more famous, doesn't show up in my search results either. I suppose we tend to follow how the external library calls itself, which is MEOS. Is there a naming guide for when we deviate from the library name itself?
FWIW, it is supposed to mirror similarly named software (also recipes here), namely GEOS (but GDAL and PROJ also come to mind).