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

[gsl] fix gsl x64-linux-dynamic build by guarding win32 string replaces #31504

Merged

Conversation

sjperkins
Copy link
Contributor

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@sjperkins sjperkins changed the title Guard win32 string replaces Guard win32 string replaces to fix gsl x64-linux-dynamic build May 18, 2023
Copy link
Contributor Author

@sjperkins sjperkins left a comment

Choose a reason for hiding this comment

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

ports/gsl/CMakeLists.txt Outdated Show resolved Hide resolved
ports/gsl/CMakeLists.txt Outdated Show resolved Hide resolved
@sjperkins sjperkins changed the title Guard win32 string replaces to fix gsl x64-linux-dynamic build Guard win32 string replaces to fix gsl x64-linux-dynamic debug build May 18, 2023
@sjperkins sjperkins changed the title Guard win32 string replaces to fix gsl x64-linux-dynamic debug build [gsl] Guard win32 string replaces to fix gsl x64-linux-dynamic debug build May 18, 2023
@sjperkins sjperkins changed the title [gsl] Guard win32 string replaces to fix gsl x64-linux-dynamic debug build [gsl] fix gsl x64-linux-dynamic debug build by guarding win32 string replaces May 18, 2023
@sjperkins sjperkins changed the title [gsl] fix gsl x64-linux-dynamic debug build by guarding win32 string replaces [gsl] fix gsl x64-linux-dynamic build by guarding win32 string replaces May 18, 2023
Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

You shouldn't completely remove burning GSL_DLL into the installed header.

ports/gsl/CMakeLists.txt Outdated Show resolved Hide resolved
Comment on lines 57 to 59
if(BUILD_SHARED_LIBS)
target_compile_definitions(gsl PRIVATE GSL_DLL)
endif(BUILD_SHARED_LIBS)
Copy link
Contributor

Choose a reason for hiding this comment

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

... but this isn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for correcting, my cmake knowledge isn't extensive. The section looks like this now:

file(READ gsl_types.h GSLTYPES_H)
if(WIN32)
    if(BUILD_SHARED_LIBS)
        target_compile_definitions(gsl PRIVATE GSL_DLL)
    endif()
endif(WIN32)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h "${GSLTYPES_H}")

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh snap, I actually meant target_compile_definitions(gsl PRIVATE DLL_EXPORT)
@dg0yt is right, burning GSL_DLL into this header is still needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh snap, I actually meant target_compile_definitions(gsl PRIVATE DLL_EXPORT) @dg0yt is right, burning GSL_DLL into this header is still needed.

No problem. Have made the change locally. However, the CI seems to point out the following problem downstream with mathgl:

error: building vcpkg-ci-mathgl:x86-windows failed with: CASCADED_DUE_TO_MISSING_DEPENDENCIES
    due to the following missing dependencies:
        mathgl[arma]:x86-windows
        mathgl[core]:x86-windows
        mathgl[examples]:x86-windows
        mathgl[fltk]:x86-windows
        mathgl[gif]:x86-windows
        mathgl[glut]:x86-windows
        mathgl[gsl]:x86-windows
        mathgl[hdf5]:x86-windows
        mathgl[jpeg]:x86-windows
        mathgl[opengl]:x86-windows
        mathgl[png]:x86-windows
        mathgl[qt5]:x86-windows
        mathgl[wx]:x86-windows
        mathgl[zlib]:x86-windows

Can you give advice on how to resolve this? I guess it may be related to this

Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

It is really only one line which needs to changed or guarded.

ports/gsl/CMakeLists.txt Show resolved Hide resolved
ports/gsl/CMakeLists.txt Outdated Show resolved Hide resolved
ports/gsl/CMakeLists.txt Outdated Show resolved Hide resolved
@sjperkins
Copy link
Contributor Author

CI is passing.

@JonLiu1993 JonLiu1993 added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label May 19, 2023
@JonLiu1993
Copy link
Member

@sjperkins, thanks for the PR, please also change the vcpkg.json file "port-version" from 2 to 3.

@JonLiu1993
Copy link
Member

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.

@JonLiu1993 JonLiu1993 marked this pull request as draft May 19, 2023 03:59
versions/g-/gsl.json Outdated Show resolved Hide resolved
@sjperkins sjperkins marked this pull request as ready for review May 19, 2023 05:58
@JonLiu1993 JonLiu1993 added the info:reviewed Pull Request changes follow basic guidelines label May 22, 2023
@dan-shaw dan-shaw merged commit 0ccb3d1 into microsoft:master May 22, 2023
@sjperkins sjperkins deleted the gsl-guard-windows-gsltypes-h-replace branch May 23, 2023 06:14
@sjperkins
Copy link
Contributor Author

Thanks for the merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants