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

[mesa] new port #14640

Merged
merged 17 commits into from
Jan 12, 2021
Merged

[mesa] new port #14640

merged 17 commits into from
Jan 12, 2021

Conversation

Neumann-A
Copy link
Contributor

@Neumann-A Neumann-A commented Nov 18, 2020

closes #6705

should currently only work for windows. (Since CI on other platforms are currently probably missing dependencies)

@NancyLi1013 NancyLi1013 added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Nov 19, 2020
@PhoebeHui
Copy link
Contributor

CI test failures:

..\src\189b5861b5-bd40f385ca.clean\meson.build:1492:2: ERROR: Neither a subproject directory nor a llvm.wrap file was found.

Full logs:
failure logs for x86-windows.zip

@Neumann-A Neumann-A marked this pull request as ready for review November 20, 2020 09:41
@PhoebeHui
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PhoebeHui PhoebeHui added the requires:all-feature-testing vcpkg install port[all features supported by that port] needs to be demonstrated to function label Nov 24, 2020
@PhoebeHui
Copy link
Contributor

@Neumann-A, here is failure for libass:x64-linux in CI testing:

/mnt/vcpkg-ci/buildtrees/libass/src/ebd911d5ca-39016ec3fc.clean/libass/ass_fontconfig.c:26:10: fatal error: fontconfig/fontconfig.h: No such file or directory
 #include <fontconfig/fontconfig.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~

failure logs for x64-linux (9).zip

@Neumann-A
Copy link
Contributor Author

Neumann-A commented Nov 27, 2020

@PhoebeHui that seems to be unrelated to this PR since the depend-info for libass does not list fontconfig!

$ ./vcpkg.exe depend-info libass
zlib:
brotli:
bzip2:
libpng: zlib
freetype[bzip2, png]: brotli, bzip2, libpng, zlib
ragel:
tool-meson:
dirent:
fribidi: tool-meson
harfbuzz: freetype, ragel
libass: dirent, freetype, fribidi, harfbuzz

also applies to x64-linux
$ ./vcpkg.exe depend-info libass:x64-linux
zlib:
brotli:
bzip2:
libpng: zlib
freetype[bzip2, png]: brotli, bzip2, libpng, zlib
ragel:
tool-meson:
fribidi: tool-meson
harfbuzz: freetype, ragel
libass: freetype, fribidi, harfbuzz

looking at the CMakeLists.txt it vendored by vcpkg it is definitely missing a find_package(Fontconfig) and a Build-Depends on it.

Since it is completely unrelated I am not going to fix it in this PR.

@PhoebeHui
Copy link
Contributor

@Neumann-A, please ignore it, it's not related to this changes, it also failed in master, I will take a look the baseline issue.

@PhoebeHui
Copy link
Contributor

I will test all features with x64-window if you haven't test yet.

@Neumann-A
Copy link
Contributor Author

@PhoebeHui. I did not test everything. One interesting point will be if llvm[core] is really enough or if llvm[core,target-x64] is required. I couldn't really deduce that from mesa's find_dep call.

@PhoebeHui
Copy link
Contributor

Feature 'egl' test failed with x64-windows, others passed.

..\src\189b5861b5-bd40f385ca.clean\meson.build:412:4: ERROR: Problem encountered: EGL requires dri

meson-log.txt

@Neumann-A
Copy link
Contributor Author

That feature probably only works for unix due to:

  elif ['darwin', 'windows'].contains(host_machine.system())
    error('EGL is not available on Windows or MacOS')

@PhoebeHui
Copy link
Contributor

Could you add comments to portfile.cmake or description in CONTROL file about the failed feature 'egl'?

@PhoebeHui PhoebeHui removed the requires:all-feature-testing vcpkg install port[all features supported by that port] needs to be demonstrated to function label Dec 2, 2020
@strega-nil
Copy link
Contributor

Adding requires:discussion to talk about at the mtg today.

@strega-nil strega-nil self-requested a review January 7, 2021 18:03
Build-Depends: mesa[core]

Feature: opengl
Description: Build support for OpenGL (all versions)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Description: Build support for OpenGL (all versions)
Description: Build support for OpenGL (all non-ES versions)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The description is from meson_options.txt stating:

option(
  'opengl',
  type : 'boolean',
  value : true,
  description : 'Build support for OpenGL (all versions)'
)

I think features in vcpkg should copy upstream descriptions 1:1 even if it seems to be a wrong.

@strega-nil
Copy link
Contributor

@Neumann-A is there a reason that we don't just always build shared-glapi?

@Neumann-A
Copy link
Contributor Author

is there a reason that we don't just always build shared-glapi?

The only discussion I found is in https://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg17040.html and there seem to be at least one use case which does not use a shared-glapi

@strega-nil
Copy link
Contributor

@Neumann-A hmm, it looks to me like unshared-glapi is pretty not-useful, except for maybe some minor cases to do with system package managers. I think the best thing to do is just make shared-glapi always-on, and if a person really needs unshared-glapi, they can work on it themselves.

@strega-nil strega-nil added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Jan 7, 2021
ports/mesa/portfile.cmake Outdated Show resolved Hide resolved
ports/mesa/portfile.cmake Show resolved Hide resolved
ports/mesa/portfile.cmake Outdated Show resolved Hide resolved
ports/mesa/portfile.cmake Outdated Show resolved Hide resolved
ports/mesa/portfile.cmake Outdated Show resolved Hide resolved
ports/mesa/portfile.cmake Outdated Show resolved Hide resolved
ports/mesa/portfile.cmake Outdated Show resolved Hide resolved
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/EGL/eglext.h)
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/EGL/eglplatform.h)

#installed by opengl-registry
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this port depend on opengl-registry then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this would only generate an hard error on the installation of mesa if it tries to install headers which are already present, The build itself will not use either egl-registry nor opengl-registry.

Comment on lines 162 to 166
foreach(_file ${_double_files})
if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}")
endif()
endforeach()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
foreach(_file ${_double_files})
if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}")
endif()
endforeach()
list(TRANSFORM _double_files PREPEND "${CURRENT_PACKAGES_DIR}/")
file(REMOVE ${_double_files})

Comment on lines +158 to +161
set(_double_files include/GL/glcorearb.h include/GL/glext.h include/GL/glxext.h
include/GLES/egl.h include/GLES/gl.h include/GLES/glext.h include/GLES/glplatform.h
include/GLES2/gl2.h include/GLES2/gl2ext.h include/GLES2/gl2platform.h
include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3platform.h)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
set(_double_files include/GL/glcorearb.h include/GL/glext.h include/GL/glxext.h
include/GLES/egl.h include/GLES/gl.h include/GLES/glext.h include/GLES/glplatform.h
include/GLES2/gl2.h include/GLES2/gl2ext.h include/GLES2/gl2platform.h
include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3platform.h)
set(_double_files include/GL/glcorearb.h include/GL/glext.h include/GL/glxext.h
include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3platform.h)

Below is already removing the GLES and GLES2 dirs.

@PhoebeHui
Copy link
Contributor

The x64-windows-static failed with 'only supports dynamic crt linkage", @Neumann-A, could you add mesa:x64-windows-static to ci.baseline file for unblocking CI testing?

CMake Error at scripts/cmake/vcpkg_check_linkage.cmake:51 (message):
  mesa only supports dynamic crt linkage
Call Stack (most recent call first):
  ports/mesa/portfile.cmake:10 (vcpkg_check_linkage)
  scripts/ports.cmake:136 (include)

@PhoebeHui PhoebeHui added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Jan 11, 2021
vcpkg_add_to_path("${PYTHON3_DIR}/Scripts")
set(ENV{PYTHON} "${PYTHON3}")

function(vcpkg_get_python_package PYTHON_DIR )
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ras0219-msft As requested I factored out a function called vcpkg_get_python_package here but I did not put it into scripts/cmake yet since I did not want to rebuild all ports within this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port request: mesa software renderer
7 participants