Skip to content
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

[bdwgc] New port #6405

Merged
merged 13 commits into from
Jun 6, 2019
Merged

[bdwgc] New port #6405

merged 13 commits into from
Jun 6, 2019

Conversation

NNemec
Copy link
Contributor

@NNemec NNemec commented May 11, 2019

After having finished this new port, I found that there were already two issues requesting bdwgc pointing to existing branches on other repos (#5471 and #6052). Feel free to pick either one of those or this one.

@msftclas
Copy link

msftclas commented May 11, 2019

CLA assistant check
All CLA requirements met.

@NancyLi1013
Copy link
Contributor

Hi @NNemec, thanks for the new port. Here are the test results from the current CI system:

x64-windows-static master test notes
bdwgc Fail New Port
x64-osx master test notes
bdwgc Fail New Port
x64-linux master test notes
bdwgc Fail New Port
x64-uwp master test notes
bdwgc Fail New Port
arm-uwp master test notes
bdwgc Fail New Port

failureLogs.zip

@vicroms
Copy link
Member

vicroms commented May 20, 2019

As of right now, the port builds successfully on Windows and Linux.
I haven't investigated what causes it to fail on UWP and MacOS X.

I'm a bit sceptical that the Linux build works properly, so I'll do some manual testing when I have time.

@NNemec
Copy link
Contributor Author

NNemec commented May 20, 2019

Great! I got UWP building locally once and will try to integrate it within the next days.

endif()

if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${LIBNAME}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME gc${STATIC_LIB_SUFFIX})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the upstream names here as much as possible to maximize compatibility.

@NNemec
Copy link
Contributor Author

NNemec commented May 21, 2019

I introduced the rename to gc.lib because that was what an existing FindGC.cmake was searching for. I'll have another close look at this with my current understanding.

@vicroms
Copy link
Member

vicroms commented May 21, 2019

@NNemec

I have local changes to the CMakeLists.txt to produce binaries with the names gc.lib and gc.dll.

I couldn't find a FindGC.cmake file in the source code, and there's also no FindGC.cmake module that ships with CMake. Is that file specific to your project?

I also noticed that when building on Linux (using the steps on their README), you get libgc.so and libgc.a binaries. So that leads me to believe that <prefix>gc<suffix> is the correct naming convention for the library.

Can I ask, how did you build the binaries before?
Are the names produced different than the ones produced by CMake?

@NNemec
Copy link
Contributor Author

NNemec commented May 21, 2019

The FindGC.cmake is checked in to the project I'm working on. In no way authoritative, just one example of what is out there...

I never built GC before the approach I submitted here.

@vicroms
Copy link
Member

vicroms commented May 22, 2019

/azp run

@vicroms
Copy link
Member

vicroms commented May 22, 2019

I modified the CMakeLists.txt file to produce binaries with the gc name.
These names should match the ones in the debian package for bdwgc.

@vicroms
Copy link
Member

vicroms commented May 23, 2019

@NNemec

Whenever you have time can you test the latest commit?
I think that your FindGC.cmake file should work with the added patch 001-install-libraries.patch.

I still haven't gotten bdwgc to work with UPW or on Mac OS.
But as an initial port, Windows and Linux support look OK.

@NNemec
Copy link
Contributor Author

NNemec commented May 23, 2019

Before I can try this out, I will first have to sort out some stuff in my local workspace. I will try over the weekend.

To get UWP working, the most straightforward approach is to deactivate the build of 'cord' - with your changes that should simply mean to drop BDWGC_INSTALL_TOOLS from the portfile.cmake.

As I understand it, cord is in no way essential for the libraries. It seems to be an interactive text editor using an advanced string class exploiting the garbage collector in some clever way. I doubt that anyone uses that code and I really see no reason to struggle with windows UI libraries when the goal is to get a low-level library compiled.

@NNemec
Copy link
Contributor Author

NNemec commented May 24, 2019

Trying out the latest changes, I find that the include files are now installed as include/bdwgc/gc.h - why was that extra subdirectory introduced? The FindGC.cmake the the project that I am porting searches for include/gc.h which worked before, but now it breaks. Trivial to fix on either side, but it should be clarified what the proper way is.

@vicroms
Copy link
Member

vicroms commented May 24, 2019

I'm modeling the port after the distributed Debian package, so the correct thing to do would be to remove the bdwgc folder and install directly to include, and that would match your FindGC.cmake.

@vicroms
Copy link
Member

vicroms commented May 25, 2019

Submitted PR upstream (ivmai/bdwgc#281).

@vicroms
Copy link
Member

vicroms commented Jun 3, 2019

/azp run

@myd7349 myd7349 mentioned this pull request Jun 5, 2019
@vicroms
Copy link
Member

vicroms commented Jun 6, 2019

As it stands, the current package works for all supported triplets.

I'm inclined to merging it right now, and update the port once the patches have been merged upstream.

@NNemec have you had time to test whether this port works for your project?

@NNemec
Copy link
Contributor Author

NNemec commented Jun 6, 2019

My original submission works fine, I have not tried out any of the later versions and won't have a chance to do so for the next two weeks. Go ahead with merging. If I encounter any problems, it can still be fixed...

@vicroms vicroms merged commit 99825d9 into microsoft:master Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants