[opennurbs] add new port - #21521
Conversation
316aef6 to
98568bc
Compare
8cd4b35 to
4ef629e
Compare
a20c832 to
c567a9a
Compare
c567a9a to
7d796e0
Compare
d204a12 to
371fa5d
Compare
Co-Authored-By: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
371fa5d to
745df6e
Compare
|
I tested this on my Mac VM and it built successfully. I don't have access to the error logs that fail the CI. So, not sure how to debug this. Note that there is a |
|
Hey Billy O'Neal (@BillyONeal), I’ve created an issue, in our tracking system, so we can consider this. |
|
Billy O'Neal (@BillyONeal) does making a project vcpkg compatible amount to getting it build with cmake or are there other requirements? We're getting hit a bit out of left field with a large pull request that I will not accept and want to better understand what is needed |
|
It is not necessary to adopt CMake to build in vcpkg (we intend to support all C++ buildsystems), however there are other requirements:
I'd like to suggest more, but I can't find a way to browse the OpenNURBS source online. What buildsystem do you currently use? We have existing examples for autotools, MSBuild, meson, bazel, qmake, as well as custom scripts. (Also, thanks for reaching out! I'm really excited to have OpenNURBS available in vcpkg :)) |
Can you see this? - https://github.com/mcneel/opennurbs |
|
We have
|
I can! Sorry that I wasn't able to find it via search engine before :)
Cool. We can handle We'll also need to patch out the checked-in copies of zlib/freetype in the build3, preferring to instead use the copies you get from |
|
Is patching zlib and freetype required? Currently, openNURBS does not use freetype . But it does use zlib. There are millions of opennurbs compressed meshes in 3dm data sets going back to Rhino 2.0 3dm files. This isn't a change we'd take lightly, needless to say. |
|
Sorry, I think I wasn't clear enough. We need to build OpenNURBS against a prebuilt copy of zlib instead of the copy checked in. That doesn't mean you need to delete it from your sources and it doesn't mean you need to make that even the default behavior of your buildsystem. We can easily make this change via a dozen or so lines of patching, which would simply remove the zlib objects from your lib and instead add I see that there's a commented-out option to build with freetype -- is that deprecated functionality that just hasn't been fully removed yet? |
|
Our version of zlib is also very old. We do plan to update to a new version of zlib at some point, but we want to run through a large set of regression tests before even considering this. It is also something we don't have a high priority for doing at the moment since what we have works and we have many other projects that customers are more willing to pay us for. |
|
That's fine -- customers using vcpkg accept and expect that they will be getting more recent versions of dependencies than what various projects were initially developed against. This is the same policy that essentially every Linux distribution follows; for example if Debian added OpenNURBS they would apply the same changes[1]. I want to also stress that not doing this is not an option -- if a user wants to use Boost and OpenNURBS at the same time, it is imperative that both Boost and OpenNURBS were built against the same copy of zlib. If each brought their own, that would violate the One Definition Rule, causing undefined behavior by the C/C++ standard. If you are especially concerned, we can add a warning message during the build that explains to users about the situation and informs them that if they experience issues they should first reproduce them with the originally tested version of zlib before reporting upstream. [1] https://www.debian.org/doc/debian-policy/ch-source.html#embedded-code-copies |
|
I cherry-picked the CMake part of my pull request based on their request. Now, I am awaiting Robert McNeel & Associates (@mcneel) to review the smaller pull requests. |
|
I'm pretty concerned about this rule and am not ready to just let anyone choose which version of zlib they want without us performing many tests. This IS our file format for Rhino and I am not willing to allow incorrect versions of our files to be created just so we can participate in vcpkg. It very well may not be an issue, but this requires thorough testing. |
|
An alternative option that avoids ODR (but is more work and I wouldn't recommend) would be to give all the zlib symbols internal linkage. Since you compile as C++, this should actually be not terrible to do by creating a namespace {
#include "zlib.c"
#include "zlib2.c"
// the rest of the zlib implementation files
}
// declare your own functions with unique names (not the zlib ones!) that the rest of the application uses.Then remove the individual zlib files from your buildsystem. This arrangement means that nobody outside your one cpp file will be able to see the zlib symbols, so it won't conflict with any other copies of zlib a user might link into their process. I notice that you already have a file This would meet our needs in vcpkg since our strict requirement is not violating ODR, though we'd still recommend adopting an external copy for better security, maintainability, and performance. [1] https://github.com/mcneel/opennurbs/blob/7.x/opennurbs_zlib.cpp |
There was a problem hiding this comment.
You have modified or added at least one vcpkg.json where you should check the license field.
Details
If you feel able to do so, please consider adding a "license" field to the following files:
ports/opennurbs/vcpkg.json
Valid values for the license field can be found in the documentation
|
Closing this PR since it seems that no progress is being made. Please reopen if work is still being done. |
|
The upstream repo has been very slow to review the contributions. Should I add the CMake file to the port here? |
Ok, after Upstream merges your dispatcher, we can delete Cmake in the process of updating the version later |
There was a problem hiding this comment.
You have modified or added at least one vcpkg.json where you should check the license field.
Details
If you feel able to do so, please consider adding a "license" field to the following files:
ports/opennurbs/vcpkg.json
Valid values for the license field can be found in the documentation
|
Is there any update on this PR? |
|
I'll add my changes (including the CMake support) as patch files in the following week. |
|
Closing this PR since it seems that no progress is being made. Please ping us to reopen if work is still being done. |
|
Is there any updates on this topic? |
|
We have recently updated the zlib project that will ship with opennurbs in Rhino 9. This is the next step needed to allow for vcpkg support. We aren't planning on doing this for Rhino 8 version of opennurbs |
Describe the pull request
What does your PR fix?
Adds opennurbs
Which triplets are supported/not supported? Have you updated the CI baseline?
all other than:
opennurbs:x64-uwp=fail
opennurbs:arm-uwp=fail
Does your PR follow the maintainer guide?
Yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --alland committed the result?Yes
If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/
No