conan-center-index icon indicating copy to clipboard operation
conan-center-index copied to clipboard

Additional patch for CPython/3.8.12, duplicate libffi symbols

Open cubanpit opened this issue 3 years ago • 4 comments

I had issues compiling cpython/3.8.12 on Windows with shared libffi, the linker complained about duplicated symbols. This patch solved the problem and I later found this recent commit in the CPython repo that seems to apply the same change.

cubanpit avatar Oct 03 '22 12:10 cubanpit

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 03 '22 12:10 CLAassistant

Sorry, the build is only launched for Access Request users. You can request access writing in this issue.

conan-center-bot avatar Oct 03 '22 12:10 conan-center-bot

I detected other pull requests that are modifying cpython/all recipe:

  • #12790
  • #12470
  • #12128
  • #9891

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

ghost avatar Oct 03 '22 13:10 ghost

@cubanpit Thank you for your contribution, do you have a log or associated issue reporting your error with more details?

uilianries avatar Oct 03 '22 16:10 uilianries

This is the message that pops up if I try to compile cpython/3.8.12 and shared libffi/3.4.2 without my patch:

malloc_closure.obj : error LNK2005: ffi_closure_alloc already defined in libffi.lib(libffi.dll) [C:\Users\anonpath\source_subfolder\PCbui
ld\_ctypes.vcxproj]
malloc_closure.obj : error LNK2005: ffi_closure_free already defined in libffi.lib(libffi.dll) [C:\Users\anonpath\source_subfolder\PCbuil
d\_ctypes.vcxproj]
C:\Users\anonapath\source_subfolder\PCbuild\amd64\_ctypes.pyd : fatal error LNK1169: one or more multiply defined symbols found [C:\Users\
anonpath\source_subfolder\PCbuild\_ctypes.vcxproj]

There is not issue about this opened on other projects, as far as I know.

cubanpit avatar Oct 04 '22 15:10 cubanpit

@cubanpit Could you please share your entire log, with the executed command? Also your used profile. As there is no issue opened describing your problem, it's hard to track your scenario, in case someone need to reproduce it.

uilianries avatar Oct 05 '22 07:10 uilianries

Sorry, the build is only launched for Access Request users. You can request access writing in this issue.

conan-center-bot avatar Oct 05 '22 09:10 conan-center-bot

Here I attach the entire log from building the package with my conanfile (sorry, not very minimal, I can produce a more minimal example if needed), and then the settings and the profile files.

settings.yml.txt stdout.txt PROFILE_Windows_VS19md_if21_cygwin.txt

EDIT: The log contains the "attempted build" without the patch, to show the issue. It does not fail with the patch applied.

EDIT2: I also append the conaninfo of the package successfully built using the patch above. conaninfo.txt

cubanpit avatar Oct 05 '22 14:10 cubanpit

@cubanpit Thank you for providing those logs.

uilianries avatar Oct 06 '22 07:10 uilianries

Please open a PR upstream 🙏

prince-chrismc avatar Oct 06 '22 18:10 prince-chrismc

@cubanpit please close the PR for 10 second then reopen it so that it retriggers a build and finally merge this change

ericLemanissier avatar Oct 14 '22 08:10 ericLemanissier

@ericLemanissier still needs to be added to access request list 😉

uilianries avatar Oct 14 '22 14:10 uilianries

Sorry, the build is only launched for Access Request users. You can request access writing in this issue.

conan-center-bot avatar Oct 14 '22 14:10 conan-center-bot

Failure in build 4 (e06d6e2a85ccfec5466fe41cfed35651f08ae739):

  • cpython/3.9.7@: Didn't run or was cancelled before finishing

  • cpython/2.7.18@: CI failed to create some packages (All logs)

    Logs for packageID 113c66262a1ab7a6d1cd09852dc058871832fcea:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.libcxx=libc++
    compiler.version=11.0
    os=Macos
    [options]
    cpython:shared=False
    
    [...]
    checking for %zd printf() format support... no
    checking for socklen_t... no
    checking for build directories... checking for --with-computed-gotos... no value specified
    checking whether cc supports computed gotos... no
    done
    checking for ensurepip... no
    configure: creating ./config.status
    config.status: creating Makefile.pre
    config.status: creating Modules/Setup.config
    config.status: creating Misc/python.pc
    config.status: creating Modules/ld_so_aix
    config.status: creating pyconfig.h
    creating Modules/Setup
    creating Modules/Setup.local
    creating Makefile
    
    
    If you want a release build with all optimizations active (LTO, PGO, etc),
    please run ./configure --enable-optimizations
    
    
    
    ----Running------
    > make -j4
    -----------------
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Modules/python.o source_subfolder/Modules/python.c
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Parser/acceler.o source_subfolder/Parser/acceler.c
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Parser/grammar1.o source_subfolder/Parser/grammar1.c
    cc -c -fno-strict-aliasing -m64 -O3 -fPIC -isysroot /Applications/conan/xcode/11/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -Isource_subfolder/Include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/openssl/1.1.1l/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/expat/2.4.1/_/_/package/c2af20934eb6114018bf39eb2aa084128d52e0d7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libffi/3.2.1/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/mpdecimal/2.4.2/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/libxcrypt/4.4.25/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/bzip2/1.0.8/_/_/package/32bef4803d4b079e983ecb27f105881e778bc5a7/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/gdbm/1.19/_/_/package/000816404a3433a6bf1745a2e66863f266abfb89/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/sqlite3/3.36.0/_/_/package/78c2bdd0f586e3dc4b9f24ed32481331c9f0657b/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tk/8.6.10/_/_/package/538d4e45e1936cab65a74f89ce34673f4165eebd/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/ncurses/6.2/_/_/package/786068a67933102159166ec8dd1d2203e92816ef/include/ncursesw -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/tcl/8.6.10/_/_/package/eb50d18a5a5d59bd0c332464a4c348ab65e353bf/include -I/Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -DSTATIC_BUILD -DNCURSES_STATIC -DFFI_BUILDING -DXML_STATIC -DNDEBUG  -DPy_BUILD_CORE -o Parser/listnode.o source_subfolder/Parser/listnode.c
    cpython/2.7.18: 
    configure: WARNING:
    
      By default, distutils will build C++ extension modules with "c++".
      If this is not intended, then set CXX on the configure command line.
    
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    make: *** [Parser/acceler.o] Error 1
    make: *** Waiting for unfinished jobs....
    make: *** [Modules/python.o] Error 1
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    make: *** [Parser/grammar1.o] Error 1
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.6'
    make: *** [Parser/listnode.o] Error 1
    WARN: tcl/8.6.10: requirement zlib/1.2.12 overridden by tk/8.6.10 to zlib/1.2.11 
    cpython/2.7.18: ERROR: Package '113c66262a1ab7a6d1cd09852dc058871832fcea' build failed
    cpython/2.7.18: WARN: Build folder /Users/jenkins/w/prod/BuildSingleReference@5/.conan/data/cpython/2.7.18/_/_/build/113c66262a1ab7a6d1cd09852dc058871832fcea
    ERROR: cpython/2.7.18: Error in build() method, line 428
    	autotools.make()
    	ConanException: Error 2 while executing make -j4
    
  • cpython/3.10.0@: Didn't run or was cancelled before finishing

  • cpython/3.7.12@: Didn't run or was cancelled before finishing

  • cpython/3.8.12@: Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

conan-center-bot avatar Oct 17 '22 13:10 conan-center-bot

It seems that there is a build failure unrelated to my changes, any way to only build the specific Python version I am patching?

cubanpit avatar Oct 18 '22 08:10 cubanpit

@cubanpit I don't think is related to your PR, as your patch is only changing another version. It will need some investigation.

uilianries avatar Oct 18 '22 12:10 uilianries

Did we recently update the mac images? https://stackoverflow.com/questions/63972113/big-sur-clang-invalid-version-error-due-to-macosx-deployment-target

prince-chrismc avatar Oct 19 '22 04:10 prince-chrismc

@prince-chrismc I don't think so. Pinging @danimtb and @davidsanfal Just in case.

uilianries avatar Oct 19 '22 09:10 uilianries

@prince-chrismc I don't think so. Pinging @danimtb and @davidsanfal Just in case.

not really...

danimtb avatar Oct 19 '22 15:10 danimtb

as a workaround id block that apple-clang 11 for that one version and see if that's enough

add a message pointing to the comment that highlighted the failure

prince-chrismc avatar Oct 19 '22 16:10 prince-chrismc

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 19 '22 15:11 stale[bot]