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

[cmake] upgrade to 3.18 #12612

Merged
merged 34 commits into from
Oct 20, 2020
Merged

[cmake] upgrade to 3.18 #12612

merged 34 commits into from
Oct 20, 2020

Conversation

cenit
Copy link
Contributor

@cenit cenit commented Jul 28, 2020

Describe the pull request
In order to get ready for CUDA 11 and OpenCV 4.4, this is a first important step.

@JackBoosY JackBoosY added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Jul 28, 2020
@Neumann-A
Copy link
Contributor

depends #12569

@rivy
Copy link

rivy commented Jul 29, 2020

It looks like cmake v3.18+ breaks several builds (see #12565).

@cenit
Copy link
Contributor Author

cenit commented Jul 29, 2020

It's not cmake 3.18, it's a bug in our script (a slipped required keyword which should not be there)

@Neumann-A
Copy link
Contributor

In the meantime 3.18.1 was released

@cenit
Copy link
Contributor Author

cenit commented Aug 24, 2020

Updated to 3.18.2
If the process is not smooth, unfortunately I don't have time to fix problems and I will close this PR.
Unfortunately, this might be very important to have merged, to fix CUDA 11 compatibility and allow many ports upgrade

@cenit cenit mentioned this pull request Aug 24, 2020
2 tasks
@JackBoosY
Copy link
Contributor

@cenit Don't worry, I can continue this PR.

@JackBoosY
Copy link
Contributor

Wow, I can't believe our cmake update caused those too many regressions. We need to handle them for a long time.

@JackBoosY
Copy link
Contributor

JackBoosY commented Aug 26, 2020

Regression list:

     4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include\cstdio(33,1): error C2061: syntax error: identifier 'std' (compiling source file src/interfaces/ecpg/ecpglib/sqlda.c) [D:\buildtrees\libpq\arm64-windows-rel\libecpg.vcxproj]
     4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include\cstdio(33,1): error C2059: syntax error: ';' (compiling source file src/interfaces/ecpg/ecpglib/sqlda.c) [D:\buildtrees\libpq\arm64-windows-rel\libecpg.vcxproj]
     4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include\cstdio(33,1): error C2449: found '{' at file scope (missing function header?) (compiling source file src/interfaces/ecpg/ecpglib/sqlda.c) [D:\buildtrees\libpq\arm64-windows-rel\libecpg.vcxproj]
     4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.26.28801\include\cstdio(91,1): error C2059: syntax error: '}' (compiling source file src/interfaces/ecpg/ecpglib/sqlda.c) [D:\buildtrees\libpq\arm64-windows-rel\libecpg.vcxproj]

Disappeared.

  • fluidsynth:x64-linux fluidsynth:arm64-windows fluidsynth:x64-windows
The following files are already installed in D:/installed/arm64-windows and are in conflict with fluidsynth:arm64-windows

Installed by fluidlite:arm64-windows
    include/fluidsynth/gen.h
    include/fluidsynth/log.h
    include/fluidsynth/misc.h
    include/fluidsynth/mod.h
    include/fluidsynth/settings.h
    include/fluidsynth/sfont.h
    include/fluidsynth/synth.h
    include/fluidsynth/types.h
    include/fluidsynth/version.h
    include/fluidsynth/voice.h

Aleady solved in master branch.

  • boost-atomic:arm-uwp boost-nowide:arm-uwp boost-regex:arm-uwp boost-signals:arm-uwp boost-system:arm-uwp boost-container:arm-uwp boost-exception:arm-uwp protobuf:arm-uwp
    pipeline bug [CI pipeline] scripts/azure-pipelines/test-modified-ports.ps1 preinstall failed #13159

  • libmagic:x64-linux libwandio:x64-linux ocilib:x64-linux farmhash:x64-linux libusb:x64-linux healpix:x64-linux libcrafter:x64-linux hwloc:x64-linux gperftools:x64-linux libxslt:x64-linux

CMake Error at scripts/cmake/vcpkg_configure_make.cmake:427 (find_program):
  Could not find LIBTOOL using the following names: libtool
  • behaviortree-cpp
/mnt/vcpkg-ci/buildtrees/behaviortree-cpp/src/haviorTree-95072d0cc8.clean/src/loggers/bt_zmq_publisher.cpp:4:10: fatal error: zmq.hpp: No such file or directory
 #include <zmq.hpp>

Fixed in master branch.

  • osg:x64-linux
CMake Error at /mnt/vcpkg-ci/installed/x64-linux/share/gdal/vcpkg-cmake-wrapper.cmake:6 (find_library):
  Could not find GDAL_LIBRARY_DEBUG using the following names: gdald, libgdal

Disappeared.

CMake Error at scripts/cmake/vcpkg_configure_make.cmake:431 (find_program):
  Could not find AUTOPOINT using the following names: autopoint
  • kealib:x64-osx
CMake Error at /Users/vagrant/Data/installed/x64-osx/share/gdal/vcpkg-cmake-wrapper.cmake:6 (find_library):
  Could not find GDAL_LIBRARY_DEBUG using the following names: gdald, libgdal

Disappeared.

  • ompl:x64-osx
[180/182] : && /Library/Developer/CommandLineTools/usr/bin/c++ -fPIC -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 16.0.0 -current_version 1.5.0 -o lib/libompl.1.5.0.dylib -install_name @rpath/libompl.16.dylib src/ompl/CMakeFiles/ompl.dir/base/goals/src/GoalLazySamples.cpp.o ...
src/ompl/CMakeFiles/ompl.dir/extensions/ode/src/OpenDEStateValidityChecker.cpp.o -L/Users/vagrant/Data/packages/flann_x64-osx/debug/lib   -L/Users/vagrant/Data/packages/ode_x64-osx/debug/lib -Wl,-rpath,/Users/vagrant/Data/packages/flann_x64-osx/debug/lib -Wl,-rpath,/Users/vagrant/Data/packages/ode_x64-osx/debug/lib  -lode  /Users/vagrant/Data/installed/x64-osx/debug/lib/libboost_serialization.a  /Users/vagrant/Data/installed/x64-osx/debug/lib/libboost_filesystem.a  /Users/vagrant/Data/installed/x64-osx/debug/lib/libboost_system.a && :
ld: warning: directory not found for option '-L/Users/vagrant/Data/packages/flann_x64-osx/debug/lib'
ld: warning: directory not found for option '-L/Users/vagrant/Data/packages/ode_x64-osx/debug/lib'
ld: library not found for -lode
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Disappeared.

  • plplot:x64-osx
CMake Error at /Volumes/data/downloads/tools/cmake-3.18.2-osx/cmake-3.18.2-Darwin-x86_64/CMake.app/Contents/share/cmake-3.18/Modules/FindPkgConfig.cmake:583 (if):
  if given arguments:

    "APPLE" "AND" "-framework" "IN_LIST" "lasi" "pango" "pangoft2_LDFLAGS_OTHER"

  Unknown arguments specified
  • ngspice:x64-windows
     2>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [D:\buildtrees\ngspice\x64-windows-rel\222eaa0cd6-aa1869c402.clean\visualc\sharedspice.vcxproj]
     2>asl.lib(stderr.c.obj) : error LNK2001: unresolved external symbol __imp__fdopen [D:\buildtrees\ngspice\x64-windows-rel\222eaa0cd6-aa1869c402.clean\visualc\sharedspice.vcxproj]

Disappeared.

  • ignition-msgs1:x64-windows ignition-msgs5:x64-windows
-- Check for working CXX compiler: G:/installed/x64-windows/bin/clang++.exe
-- Check for working CXX compiler: G:/installed/x64-windows/bin/clang++.exe - broken
CMake Error at D:/downloads/tools/cmake-3.18.2-windows/cmake-3.18.2-win32-x86/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "D:/installed/x64-windows/bin/clang.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: D:/buildtrees/ignition-msgs5/x64-windows-rel/CMakeFiles/CMakeTmp
    
    Run Build Command(s):D:/downloads/tools/ninja/ninja-1.10.0/ninja.exe cmTC_60fe0 && [1/2] Building C object CMakeFiles/cmTC_60fe0.dir/testCCompiler.c.obj
    FAILED: CMakeFiles/cmTC_60fe0.dir/testCCompiler.c.obj 
    D:\installed\x64-windows\bin\clang.exe   /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP   /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -MD -MT CMakeFiles/cmTC_60fe0.dir/testCCompiler.c.obj -MF CMakeFiles\cmTC_60fe0.dir\testCCompiler.c.obj.d -o CMakeFiles/cmTC_60fe0.dir/testCCompiler.c.obj -c testCCompiler.c
    clang: error: no such file or directory: '/nologo'
    clang: error: no such file or directory: '/DWIN32'
    clang: error: no such file or directory: '/D_WINDOWS'
    clang: error: no such file or directory: '/W3'
    clang: error: no such file or directory: '/utf-8'
    clang: error: no such file or directory: '/MP'
    clang: error: no such file or directory: '/D_DEBUG'
    clang: error: no such file or directory: '/MDd'
    clang: error: no such file or directory: '/Z7'
    clang: error: no such file or directory: '/Ob0'
    clang: error: no such file or directory: '/Od'
    clang: error: no such file or directory: '/RTC1'
    ninja: build stopped: subcommand failed.

Disappeared.

  • rpclib:x64-windows-static
CMake Error at CMakeLists.txt:74 (configure_file):
  configure_file Problem configuring file

need disable pararrel configure #13162

  • qt5-tools:x64-windows-static
Qt5Guid.lib(qrhid3d11.obj) : error LNK2001: unresolved external symbol IID_IDXGIFactory2
Qt5Guid.lib(qrhid3d11.obj) : error LNK2001: unresolved external symbol IID_ID3D11DeviceContext1
Qt5Guid.lib(qrhid3d11.obj) : error LNK2001: unresolved external symbol IID_ID3DUserDefinedAnnotation

Disappeared.

@Neumann-A
Copy link
Contributor

The osx regression are mainly due to autopoint (gettext) not being available.

@Neumann-A
Copy link
Contributor

@JackBoosY: Seems like most of the errors are baseline regression. libtool missing on linux, autopoint missing on osx I saw one vcpkg-cmake-wrapper.cmake regression which seems to use an incomplete list of library names. Did the CI machines get reprovisioned?

@Neumann-A
Copy link
Contributor

on windows the wrong compiler seems to be used. (clang instead of MSVC)

@JackBoosY
Copy link
Contributor

Okay, all regressions listed, we need to open a few PRs to fix them.

@JackBoosY
Copy link
Contributor

@Neumann-A What do you think about ignition-msgs and qt5-tools regressions?

@cenit
Copy link
Contributor Author

cenit commented Aug 26, 2020

@Neumann-A What do you think about qt5-tools regressions?

missing link to uuid.lib ?

@cenit
Copy link
Contributor Author

cenit commented Aug 26, 2020

@Neumann-A What do you think about ignition-msgs regressions?

just a guess: maybe clang gets on path due to

vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin)
vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin)

(from ignition-msg5 portfile) and due to a bug in llvm portfile clang is left in the bin folder and not moved to tools?

@Neumann-A
Copy link
Contributor

just a guess: maybe clang gets on path due to

But it should not be the first compiler on the path.

missing link to uuid.lib ?

seems like it: I also had an issue with it here #12936 (comment) .
The dxgui.lib issue is probably also related to this. (cannot find the comment currently)
Somehow libraries are missing/vanishing from the Windows SDK on the CI machines

@JackBoosY
Copy link
Contributor

JackBoosY commented Aug 26, 2020

@Neumann-A Tools libtool and autopoint was installed, but the following codes didn't find it.

find_program(LIBTOOL libtool REQUIRED)
if(NOT LIBTOOL)
message(STATUS "${PORT} requires libtool from the system package manager (example: \"sudo apt-get install libtool libtool-bin\")")
endif()
find_program(AUTOPOINT autopoint REQUIRED)
if(NOT AUTOPOINT)
message(STATUS "${PORT} requires autopoint from the system package manager (example: \"sudo apt-get install autopoint\")")
endif()

Maybe related to cmake update changes.

Yes, I can confirm that's related.

@Neumann-A
Copy link
Contributor

@JackBoosY: Add search paths /usr/bin and /usr/local/bin and retry

@Neumann-A
Copy link
Contributor

Ah that is the same issue as the pkg-config not found issue before. The REQUIRED keyword was ignored before.....

The find_program(), find_library(), find_path() and find_file() commands gained a new REQUIRED option that will stop processing with an error message if nothing is found.

@JackBoosY
Copy link
Contributor

One issue left. Almost done.

@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Oct 13, 2020
@BillyONeal BillyONeal removed the depends:vm-update PR contains changes to the VM provisioning scripts label Oct 13, 2020
@JackBoosY
Copy link
Contributor

These regressions will be fixed in another PR.

@dan-shaw
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JackBoosY
Copy link
Contributor

JackBoosY commented Oct 19, 2020

The qca regressions has appeared again and will be fixed in another PR.
And this bug was fixed on upstream(https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5273).

This fix has not been merged into 3.18.4, we still need to submit a PR to fix this issue.

@BillyONeal
Copy link
Member

The "freetds" failures are due to their upstream server being down and nothing depends on that port, so I'm going to merge this despite that "regression" (assuming osx comes back OK; it's not done at time of writing)

@BillyONeal BillyONeal merged commit eb18317 into microsoft:master Oct 20, 2020
Jimmy-Hu added a commit to Jimmy-Hu/vcpkg that referenced this pull request Oct 20, 2020
@cenit cenit deleted the dev/cenit/cmake318 branch October 20, 2020 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants