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 build.jl using BinaryBuilder #98
Conversation
deps/build.jl
Outdated
else | ||
fpu_control = "" | ||
error("Your platform $(Sys.MACHINE) is not supported by this package!") |
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.
this completely breaks the package on freebsd and alpine linux, this really isn't suitable to be released until there's a fallback so those platforms that are working now aren't left in the cold
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.
At a minimum the build script needs to be changed to support finding a local version of Ipopt in LD_LIBRARY_PATH
.
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.
At a minimum the build script needs to be changed to support finding a local version of Ipopt in LD_LIBRARY_PATH.
We explicitly didn't want to support this, because picking up random versions of libraries from the environment is the source of many woes.
The easiest solution right now is probably to replace the error()
here with including the old BinDeps
build script.
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.
the source of many woes
In this particular case, it's necessary to be able to use a 3-5x faster version of the library that you need to build yourself because it uses non-redistributable academic-license components
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.
Yes, Ipopt is unusual because some serious users will want to compile their own version anyway. Also the API is pretty static so we don't have to worry about version incompatibilities.
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.
In that case, what we should do is tell the users to install the custom binaries (or provide the magic script to build it) into the deps/usr
directory within this directory, then invert the two if statements; e.g.
# First, check to see if we're all satisfied
if any(!satisfied(p; verbose=verbose) for p in products)
if platform_key() in keys(download_info)
# Download and install binaries
url, tarball_hash = download_info[platform_key()]
install(url, tarball_hash; prefix=prefix, force=true, verbose=true)
...
In fact, that should be the default.
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.
This will work just fine as long as the libraries are within deps/usr/lib
, etc... I'm not so sure we should just pick up random things on LD_LIBRARY_PATH
though; do you think it's too much of a bother to tell the user to install to that prefix in this case? Especially since this is a case where we're expecting the user to compile manually.
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.
The deps/usr/lib
solution sounds fine to me.
Close/open to trigger AppVeyor. |
@staticfloat note the failures on appveyor |
Okay the Windows errors are because we use GCC 7 in Perhaps it's time for me to revisit moving the Windows buildbots over to a cross-compile + wine architecture again. The epic yak-shave continues. |
One small note; you should create an |
New build.jl that bundles windows with
|
e93c58d
to
b6b91a6
Compare
Woohoo! It passes! Also, whoops we’re still using the deprecated syntax. I’ll fix that on my ipoptbuilder repo (you’ll also need to fix it here, pass in a symbol as a variable name for your products, then use the write_deps_file function instead of the macro) and then I think we’re ready to go here. |
Awesome :)
|
The documentation would basically say "build from source like normal, except say
The newest |
@staticfloat the logic for user-provided binaries is a bit off. |
Another issue, seems like a tricky one, is that the |
I was a little conflicted on this; but then I thought about this again and you're absolutely right. I've updated the
Aha, that is a really good bug you just found. The default library search path for executables isn't containing the directory for the julia_libdir = dirname(first(filter(x -> contains(x, "libjulia"), Sys.Libdl.dllist())))
@static if Compat.Sys.isapple()
ENV["DYLD_FALLBACK_LIBRARY_PATH"] = string(get(ENV, "DYD_FALLBACK_LIBRARY_PATH", ""), ":", julia_libdir)
elseif Compat.Sys.islinux()
ENV["LD_LIBRARY_PATH"] = string(get(ENV, "LD_LIBRARY_PATH", ""), ":", julia_libdir)
end (By the by, I just noticed you aren't calling If that |
@staticfloat, thanks! Your fix works on Linux but not OS X. Random googling says that |
Hmmm, looks like |
Fantastic. I'll go ahead and add this to |
I'd actually prefer for this not to be hidden in |
@@ -1,5 +1,4 @@ | |||
julia 0.6 | |||
BinDeps | |||
julia 0.6.2 |
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.
what doesn't work on 0.6.0 or 0.6.1? is this platform specific?
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 was only able to run the linux binaries on 0.6.2. Earlier versions have a mismatching version of libgfortran.
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.
if 0.6.0 and 0.6.1 work on non linux then it should be
julia 0.6
@linux julia 0.6.2
though that's also specific to binaries, distro packages of julia aren't necessarily going to be built with gcc 7.
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.
or source builds of julia for that matter
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 don't have the ability to test 0.6.0 and 0.6.1 on macOS. It might have the same issue. We'll probably direct source builders of Julia to build their own copy of Ipopt. Don't know about distro packages.
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.
Source builds and distro packages are a design question with BinaryBuilder. We'll be following whichever conventions emerge in the julia ecosystem.
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.
travis/appveyor can easily test old point releases on a branch
sounds like an open design question that hasn't been given a lot of thought. there are big gaps and holes in what it works for that would be regressions for this package if released in its current state.
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.
sounds like an open design question that hasn't been given a lot of thought. there are big gaps and holes in what it works for that would be regressions for this package if released in its current state.
I agree, but we also need to consider that macOS binaries have been broken since November (#94) which is quite a regression. I will at least hold off on releasing before we figure out what's happening with CoinOptServices.
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.
couldn't you use binaryprovider just on mac for now then?
@osx Homebrew | ||
@windows WinRPM | ||
BinaryProvider | ||
Compat |
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.
0.27 for isapple etc
If this works, closes (or at least makes stale) all build-related issues.
Thanks a lot to @staticfloat for developing IpoptBuilder!
Closes #61
Closes #68
Closes #84
Closes #86
Closes #90
Closes #94
Closes #97