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

[vcpkg] Fix redefinition for OVERLAY_TRIPLETS_ENV #14744

Merged
merged 2 commits into from Nov 25, 2020

Conversation

davidxiaozhi
Copy link
Contributor

Fix the bug for master branch, the var of OVERLAY_TRIPLETS_ENV be defined two times (the lines of 923 and 925 )

[69/83] Building CXX object CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o
FAILED: CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o
/usr/local/bin/g++-6 -DVCPKG_USE_STD_FILESYSTEM=0 -I../include -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -include /Users/lizhipeng/develop/project/git_project/opensource/c++/vcpkg/toolsrc/include/pch.h -std=c++1z -MD -MT CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o -MF CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o.d -o CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o -c ../src/vcpkg/vcpkgcmdarguments.cpp
../src/vcpkg/vcpkgcmdarguments.cpp:925:48: error: redefinition of 'constexpr const vcpkg::StringLiteral vcpkg::VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV'
constexpr StringLiteral VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV;
^~~~~~~~~~~~~~~~~~~~
In file included from ../src/vcpkg/vcpkgcmdarguments.cpp:9:0:
../include/vcpkg/vcpkgcmdarguments.h:145:40: note: 'constexpr const vcpkg::StringLiteral vcpkg::VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV' previously defined here
constexpr static StringLiteral OVERLAY_TRIPLETS_ENV = "VCPKG_OVERLAY_TRIPLETS";

Describe the pull request

  • What does your PR fix? Fixes #

  • Which triplets are supported/not supported? Have you updated the CI baseline?

  • Does your PR follow the maintainer guide?

Fix the bug  for master branch, the var of OVERLAY_TRIPLETS_ENV  be defined two times (the lines of 923 and 925 )


[69/83] Building CXX object CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o
FAILED: CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o
/usr/local/bin/g++-6 -DVCPKG_USE_STD_FILESYSTEM=0 -I../include -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -include /Users/lizhipeng/develop/project/git_project/opensource/c++/vcpkg/toolsrc/include/pch.h -std=c++1z -MD -MT CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o -MF CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o.d -o CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o -c ../src/vcpkg/vcpkgcmdarguments.cpp
../src/vcpkg/vcpkgcmdarguments.cpp:925:48: error: redefinition of 'constexpr const vcpkg::StringLiteral vcpkg::VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV'
     constexpr StringLiteral VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV;
                                                ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/vcpkg/vcpkgcmdarguments.cpp:9:0:
../include/vcpkg/vcpkgcmdarguments.h:145:40: note: 'constexpr const vcpkg::StringLiteral vcpkg::VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV' previously defined here
         constexpr static StringLiteral OVERLAY_TRIPLETS_ENV = "VCPKG_OVERLAY_TRIPLETS";
@NancyLi1013 NancyLi1013 self-assigned this Nov 24, 2020
@NancyLi1013 NancyLi1013 added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Nov 24, 2020
Copy link
Contributor

@NancyLi1013 NancyLi1013 left a comment

Choose a reason for hiding this comment

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

Thanks for your quick fix.

toolsrc/src/vcpkg/vcpkgcmdarguments.cpp Outdated Show resolved Hide resolved
@NancyLi1013 NancyLi1013 changed the title Update vcpkgcmdarguments.cpp [vcpkg] Fix redefinition for OVERLAY_TRIPLETS_ENV Nov 24, 2020
@Neumann-A
Copy link
Contributor

I also mentioned it in 11ded36#commitcomment-44292710
but somehow the PR #14616 did not show the doubling. so somehow this got double fixed and broken at the same time.

@NancyLi1013
Copy link
Contributor

@Neumann-A

Thanks for looking into this problem. Yes, this is due to double fix in these two PRs
#14616 ,#14436. But merge the PR at different time.

@strega-nil strega-nil merged commit d611b06 into microsoft:master Nov 25, 2020
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* Update vcpkgcmdarguments.cpp

Fix the bug  for master branch, the var of OVERLAY_TRIPLETS_ENV  be defined two times (the lines of 923 and 925 )


[69/83] Building CXX object CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o
FAILED: CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o
/usr/local/bin/g++-6 -DVCPKG_USE_STD_FILESYSTEM=0 -I../include -O3 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -include /Users/lizhipeng/develop/project/git_project/opensource/c++/vcpkg/toolsrc/include/pch.h -std=c++1z -MD -MT CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o -MF CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o.d -o CMakeFiles/vcpkglib.dir/src/vcpkg/vcpkgcmdarguments.cpp.o -c ../src/vcpkg/vcpkgcmdarguments.cpp
../src/vcpkg/vcpkgcmdarguments.cpp:925:48: error: redefinition of 'constexpr const vcpkg::StringLiteral vcpkg::VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV'
     constexpr StringLiteral VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV;
                                                ^~~~~~~~~~~~~~~~~~~~
In file included from ../src/vcpkg/vcpkgcmdarguments.cpp:9:0:
../include/vcpkg/vcpkgcmdarguments.h:145:40: note: 'constexpr const vcpkg::StringLiteral vcpkg::VcpkgCmdArguments::OVERLAY_TRIPLETS_ENV' previously defined here
         constexpr static StringLiteral OVERLAY_TRIPLETS_ENV = "VCPKG_OVERLAY_TRIPLETS";

* Update toolsrc/src/vcpkg/vcpkgcmdarguments.cpp

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants