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

[package] poco/1.9.4: Not compile on Windows #4184

Closed
paulocoutinhox opened this issue Jan 9, 2021 · 7 comments
Closed

[package] poco/1.9.4: Not compile on Windows #4184

paulocoutinhox opened this issue Jan 9, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@paulocoutinhox
Copy link
Contributor

paulocoutinhox commented Jan 9, 2021

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: poco/1.9.4
  • Operating System+version: Windows
  • Compiler+version: MSVC 19.28.29335.0
  • Conan version: conan latest
  • Python version: Python 3.7.9

Steps to reproduce (Include if Applicable)

Use ezored (ezored.github.io) default steps for windows.

Logs (Include/Attach if Applicable)

Click to expand log
[more errors]

PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::CertificateValidationException::CertificateValidationException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0CertificateValidationException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::CertificateValidationException::CertificateValidationException(int)" (??0CertificateValidationException@Net@Poco@@QEAA@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::InvalidCertificateException::InvalidCertificateException(class Poco::Net::InvalidCertificateException const &)" (??0InvalidCertificateException@Net@Poco@@QEAA@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::InvalidCertificateException::InvalidCertificateException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0InvalidCertificateException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::InvalidCertificateException::InvalidCertificateException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Poco::Exception const &,int)" (??0InvalidCertificateException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVException@2@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::InvalidCertificateException::InvalidCertificateException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0InvalidCertificateException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::InvalidCertificateException::InvalidCertificateException(int)" (??0InvalidCertificateException@Net@Poco@@QEAA@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::SSLConnectionUnexpectedlyClosedException(class Poco::Net::SSLConnectionUnexpectedlyClosedException const &)" (??0SSLConnectionUnexpectedlyClosedException@Net@Poco@@QEAA@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::SSLConnectionUnexpectedlyClosedException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0SSLConnectionUnexpectedlyClosedException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::SSLConnectionUnexpectedlyClosedException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Poco::Exception const &,int)" (??0SSLConnectionUnexpectedlyClosedException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVException@2@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::SSLConnectionUnexpectedlyClosedException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0SSLConnectionUnexpectedlyClosedException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::SSLConnectionUnexpectedlyClosedException(int)" (??0SSLConnectionUnexpectedlyClosedException@Net@Poco@@QEAA@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLContextException::SSLContextException(class Poco::Net::SSLContextException const &)" (??0SSLContextException@Net@Poco@@QEAA@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLContextException::SSLContextException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0SSLContextException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLContextException::SSLContextException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Poco::Exception const &,int)" (??0SSLContextException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVException@2@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLContextException::SSLContextException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0SSLContextException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLContextException::SSLContextException(int)" (??0SSLContextException@Net@Poco@@QEAA@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLException::SSLException(class Poco::Net::SSLException const &)" (??0SSLException@Net@Poco@@QEAA@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLException::SSLException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0SSLException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLException::SSLException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class Poco::Exception const &,int)" (??0SSLException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVException@2@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLException::SSLException(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0SSLException@Net@Poco@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: __cdecl Poco::Net::SSLException::SSLException(int)" (??0SSLException@Net@Poco@@QEAA@H@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual __cdecl Poco::Net::CertificateValidationException::~CertificateValidationException(void)" (??1CertificateValidationException@Net@Poco@@UEAA@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual __cdecl Poco::Net::InvalidCertificateException::~InvalidCertificateException(void)" (??1InvalidCertificateException@Net@Poco@@UEAA@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::~SSLConnectionUnexpectedlyClosedException(void)" (??1SSLConnectionUnexpectedlyClosedException@Net@Poco@@UEAA@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual __cdecl Poco::Net::SSLContextException::~SSLContextException(void)" (??1SSLContextException@Net@Poco@@UEAA@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual __cdecl Poco::Net::SSLException::~SSLException(void)" (??1SSLException@Net@Poco@@UEAA@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: class Poco::Net::CertificateValidationException & __cdecl Poco::Net::CertificateValidationException::operator=(class Poco::Net::CertificateValidationException const &)" (??4CertificateValidationException@Net@Poco@@QEAAAEAV012@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: class Poco::Net::InvalidCertificateException & __cdecl Poco::Net::InvalidCertificateException::operator=(class Poco::Net::InvalidCertificateException const &)" (??4InvalidCertificateException@Net@Poco@@QEAAAEAV012@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: class Poco::Net::SSLConnectionUnexpectedlyClosedException & __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::operator=(class Poco::Net::SSLConnectionUnexpectedlyClosedException const &)" (??4SSLConnectionUnexpectedlyClosedException@Net@Poco@@QEAAAEAV012@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: class Poco::Net::SSLContextException & __cdecl Poco::Net::SSLContextException::operator=(class Poco::Net::SSLContextException const &)" (??4SSLContextException@Net@Poco@@QEAAAEAV012@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: class Poco::Net::SSLException & __cdecl Poco::Net::SSLException::operator=(class Poco::Net::SSLException const &)" (??4SSLException@Net@Poco@@QEAAAEAV012@AEBV012@@Z) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual char const * __cdecl Poco::Net::CertificateValidationException::className(void)const " (?className@CertificateValidationException@Net@Poco@@UEBAPEBDXZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual char const * __cdecl Poco::Net::InvalidCertificateException::className(void)const " (?className@InvalidCertificateException@Net@Poco@@UEBAPEBDXZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual char const * __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::className(void)const " (?className@SSLConnectionUnexpectedlyClosedException@Net@Poco@@UEBAPEBDXZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual char const * __cdecl Poco::Net::SSLContextException::className(void)const " (?className@SSLContextException@Net@Poco@@UEBAPEBDXZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual char const * __cdecl Poco::Net::SSLException::className(void)const " (?className@SSLException@Net@Poco@@UEBAPEBDXZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual class Poco::Exception * __cdecl Poco::Net::CertificateValidationException::clone(void)const " (?clone@CertificateValidationException@Net@Poco@@UEBAPEAVException@3@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual class Poco::Exception * __cdecl Poco::Net::InvalidCertificateException::clone(void)const " (?clone@InvalidCertificateException@Net@Poco@@UEBAPEAVException@3@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual class Poco::Exception * __cdecl Poco::Net::SSLConnectionUnexpectedlyClosedException::clone(void)const " (?clone@SSLConnectionUnexpectedlyClosedException@Net@Poco@@UEBAPEAVException@3@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]
PocoNetSSLWinmd.lib(SSLException.obj) : error LNK2005: "public: virtual class Poco::Exception * __cdecl Poco::Net::SSLContextException::clone(void)const " (?clone@SSLContextException@Net@Poco@@UEBAPEAVException@3@XZ) already defined in PocoNetSSLmd.lib(SSLException.obj) [D:\a\ezored\ezored\build\windows_app\Release\x86_64\target\ezored.vcxproj]

Related:
pocoproject/poco#3181

@paulocoutinhox paulocoutinhox added the bug Something isn't working label Jan 9, 2021
@dmn-star
Copy link
Contributor

dmn-star commented Jan 9, 2021

is POCO static compiled?

@paulocoutinhox
Copy link
Contributor Author

Hi @dmn-star,

Yes. Im using default options.

@paulocoutinhox
Copy link
Contributor Author

I tried version 1.9.4 and 1.10.1.

But always problem with net/ssl.

@dmn-star
Copy link
Contributor

dmn-star commented Jan 10, 2021

Please ensure that the preprocessor define POCO_STATIC is set.

To link statically, the code using the POCO C++ Libraries must be compiled with the preprocessor symbol POCO_STATIC defined.
https://pocoproject.org/docs/99150-WindowsPlatformNotes.html

@mathbunnyru
Copy link
Contributor

mathbunnyru commented Jan 10, 2021

I have the same error:
#4109
https://c3i.jfrog.io/c3i/misc/logs/pr/4109/2/easyhttpcpp/2.1.0/53814772afa9bf2e784f626b8e976d99d6b8acc7/create_stdout.txt

PocoNetSSLWinmdd.lib(Context.obj) : error LNK2005: "public: virtual __cdecl Poco::Net::Context::~Context(void)" (??1Context@Net@Poco@@UEAA@XZ) already defined in PocoNetSSLmdd.lib(Context.obj) [C:\J\w\cci_PR-4109@4\2\fed8065b-7c34-462c-be29-94d9bac14bfb\recipes\easyhttpcpp\all\test_package\build\ad98232a8d707267556bab439ef3b33aba8fb473\test_package.vcxproj]

Somehow there are two libraries PocoNetSSLWinmdd.lib and PocoNetSSLmdd.lib which exist simultaneously on Windows, share a lot of symbols and that causes link errors.
I think the error is how Poco is built in Conan under Windows.

@paulocoutinhox
Copy link
Contributor Author

Hi,

I solved the problem:

On Windows you need set the options as this:

https://github.com/ezored/ezored/blob/master/files/targets/windows_app/conan/recipe/conanfile.py#L33-L35

Thanks.

@mathbunnyru
Copy link
Contributor

I think the proper way to solve the problem for CCI is to make POCO work well under Windows by default.
I will create the PR later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants