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: attempt to avoid dependency on llvm #351

Closed

Conversation

maxim-belkin
Copy link
Owner

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Does your submission pass
    brew audit --strict <formula> (where <formula> is the name of the formula you're submitting)?
  • Have you built your formula locally prior to submission with brew install <formula>?

Related to #329

@maxim-belkin maxim-belkin added the Do not merge (yet) "Do not merge" label for PRs that must be shipped together with other changes label Mar 5, 2018
@maxim-belkin maxim-belkin self-assigned this Mar 5, 2018
@maxim-belkin
Copy link
Owner Author

@maxim-belkin
Copy link
Owner Author

Locally, I had to hack automake (replace /usr/bin/perl with Homebrew'ed perl)

@maxim-belkin
Copy link
Owner Author

Merging changes from libva-1.8.2 because otherwise mesa installs an old version of libva :(

@maxim-belkin
Copy link
Owner Author

maxim-belkin commented Mar 6, 2018

🍏

Warning: linuxbrew/xorg/mesa dependency pcre gettext was built with a different C++ standard
library (libstdc++ from gcc-5). This may cause problems at runtime.
...
Warning: mesa dependency pcre was built with a different C++ standard
library (libstdc++ from gcc-4.8). This may cause problems at runtime

@sjackman should we worry about the above messages?

And these deps are for me to verify:

==> brew linkage --test linuxbrew/xorg/mesa
System libraries:
/lib/x86_64-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/libm.so.6
/lib/x86_64-linux-gnu/libpthread.so.0
/lib/x86_64-linux-gnu/librt.so.1
Possible unnecessary dependencies:
libsha1
libva
libvdpau
wayland-protocols
xorg
No broken dylib links
No unwanted system libraries

@sjackman
Copy link
Contributor

sjackman commented Mar 6, 2018

dependency pcre was built with a different C++ standard library (libstdc++ from gcc-5)
…
dependency pcre was built with a different C++ standard library (libstdc++ from gcc-4.8)

That's weird. Which is it? pcre can't be built with both gcc-5 and gcc-4.8. The current pcre bottle was built with GCC 4.8.
In any case, you can ignore this warning I think.

@sjackman
Copy link
Contributor

sjackman commented Mar 6, 2018

Why does mesa depend on llvm? Is LLVM a build-time or run-time dependency? Is it possible to remove this dependency? Do you get a build error if you remove this dependency, and if so, what is it?

@maxim-belkin
Copy link
Owner Author

checking for vdpau >= 1.1... no
configure: error: Package requirements (vdpau >= 1.1) were not met:

@maxim-belkin
Copy link
Owner Author

configure: WARNING: unrecognized options: --with-sha1, --enable-sysfs

@sjackman
Copy link
Contributor

sjackman commented Mar 6, 2018

checking for vdpau >= 1.1... no
configure: error: Package requirements (vdpau >= 1.1) were not met:

Is that the error when you remove llvm? vdpau doesn't depend on LLVM, so that error does not make sense to me.

@maxim-belkin
Copy link
Owner Author

no, there is --enable-vdpau configure option.

@maxim-belkin
Copy link
Owner Author

configure: error: --enable-llvm is required when building r300

@sjackman
Copy link
Contributor

sjackman commented Mar 6, 2018

It looks as though LLVM is a needed to build a driver for the r300 AMD Radeon Rx 300. If you disable support for that card, I think we can remove the llvm dependency.
See http://www.linuxfromscratch.org/blfs/view/systemd/x/mesa.html

@maxim-belkin
Copy link
Owner Author

not only r300... but that's not so important.
I'm running a local test in which I disable these by default.

@maxim-belkin
Copy link
Owner Author

Success: https://gist.github.com/04120e0b07a1500e9d44ba5468c73361

/bin/sed: can't read src/mesa/drivers/dri/i965/.deps/brw_blorp.Plo: No such file or directory

        prefix:          /home/linuxbrew/.linuxbrew/Cellar/mesa/17.2.3_2
        exec_prefix:     ${prefix}
        libdir:          ${exec_prefix}/lib
        includedir:      ${prefix}/include

        OpenGL:          yes (ES1: yes ES2: yes)

        OSMesa:          libOSMesa

        DRI platform:    drm
        DRI drivers:     i965 nouveau r200 radeon swrast 
        DRI driver dir:  ${libdir}/dri
        GLX:             DRI-based

        EGL:             yes
        EGL drivers:     builtin:egl_dri2 builtin:egl_dri3
        GBM:             yes
        EGL/Vulkan/VL platforms:   drm x11 surfaceless

        Vulkan drivers:  no

        llvm:            no

        Gallium drivers: i915 nouveau r600 svga swrast
        Gallium st:      mesa xa xvmc va

        HUD extra stats: no
        HUD lmsensors:   no


        Shared libs:     yes
        Static libs:     no
        Shared-glapi:    yes

        CFLAGS:          -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math
        CXXFLAGS:        -Wall -fno-math-errno -fno-trapping-math
        LDFLAGS:         
        Macros:          -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_STRTOD_L -DHAVE_DLOPEN -DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_DRM_PLATFORM -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DHAVE_DRI3 -DENABLE_SHADER_CACHE -DHAVE_MINCORE

        PYTHON2:         python2.7

        Run 'make' to build Mesa

@maxim-belkin
Copy link
Owner Author

@sjackman what should we do with indirect dependencies?

Indirect dependencies with linkage:
  expat
  linuxbrew/xorg/libx11
  linuxbrew/xorg/libxcb
  linuxbrew/xorg/libxdamage
  linuxbrew/xorg/libxext
  linuxbrew/xorg/libxfixes
  linuxbrew/xorg/libxshmfence
  linuxbrew/xorg/libxv
  linuxbrew/xorg/libxvmc
  linuxbrew/xorg/libxxf86vm
  zlib

@sjackman
Copy link
Contributor

sjackman commented Mar 6, 2018

I'm okay with leaving them as indirect dependencies for now. Perhaps it's a topic that we can revisit in the future.

Formula/mesa.rb Outdated
@@ -11,28 +11,33 @@ class Mesa < Formula

option "without-test", "Skip compile-time tests"
option "with-static", "Build static libraries (not recommended)"
option "with-llvm-support", "Build with extra drivers. Requires LLVM and Libelf"
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this line. Use instead depends_on "llvm" => :optional

Copy link
Contributor

Choose a reason for hiding this comment

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

You could if you like include

option "with-llvm", "Build drivers that require llvm and libelf"

Formula/mesa.rb Outdated
depends_on "libelf" # radeonsi requires libelf when using llvm
# Revisit later [@maxim-belkin, March 6, 2018]
# depends_on "linuxbrew/xorg/wayland-protocols" => :recommended
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Use instead

depends_on "libelf" if build.with? "llvm"

Formula/mesa.rb Outdated
]

if build.with? "llvm-support"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

Formula/mesa.rb Outdated

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "pkg-config" => :build
depends_on "python" => :build
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change this to depends_on "python" => :build

The python formula (python 3) is currently broken.

We can have a look later if it makes sense to build this with python3.

Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect that Michka meant python@2 here.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I think so too :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, sorry, python@2 :)

@maxim-belkin
Copy link
Owner Author

waiting for Homebrew/homebrew-core#25060 to be merged

@sjackman
Copy link
Contributor

sjackman commented Mar 10, 2018

PR Homebrew/homebrew-core#25060 PEP 394 is merged.

@maxim-belkin maxim-belkin force-pushed the mesa-libva-update branch 2 times, most recently from b96045a to 165907c Compare March 12, 2018 01:15
Formula/libva.rb Outdated

bottle do
sha256 "202cad95248823257d1d9cedefb76fc95593ef3dd61d93721a14f000f75bd0db" => :x86_64_linux
end
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to remove the bottle block.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Looks like it has to be removed though:

==> Installing linuxbrew/xorg/mesa dependency: linuxbrew/xorg/libva
==> Downloading https://linuxbrew.bintray.com/bottles-xorg/libva-1.8.2.x86_64_linux.bottle.tar.gz
/usr/bin/curl --show-error --user-agent Linuxbrew/1.5.6-14-g42f6c7a (Linux; x86_64 Ubuntu 14.04.5 LTS) curl/7.35.0 --fail --location --remote-time --continue-at - --output /home/linuxbrew/.cache/Homebrew/libva-1.8.2.x86_64_linux.bottle.tar.gz.incomplete https://linuxbrew.bintray.com/bottles-xorg/libva-1.8.2.x86_64_linux.bottle.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 401 Unauthorized
Error: Failed to download resource "libva"
Download failed: https://linuxbrew.bintray.com/bottles-xorg/libva-1.8.2.x86_64_linux.bottle.tar.gz

Copy link
Contributor

@sjackman sjackman Mar 12, 2018

Choose a reason for hiding this comment

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

Hmm. Interesting. I guess because this PR is modifying both libva and mesa? I wonder how this issue is handled by upstream. In any case, your workaround of deleting the bottle block is fine.

@maxim-belkin
Copy link
Owner Author

==> make -C xdemos DEMOS_PREFIX=/home/linuxbrew/.linuxbrew/Cellar/mesa/17.2.3_2
.
Last 150 lines from /home/linuxbrew/.cache/Homebrew/Logs/mesa/04.make:
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:308: undefined reference to `glMatrixMode'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:310: undefined reference to `glPushMatrix'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:311: undefined reference to `glTranslated'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:313: undefined reference to `glPopMatrix'
/tmp/cc8mMM2N.o: In function `main':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:800: undefined reference to `glDeleteLists'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:801: undefined reference to `glDeleteLists'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:802: undefined reference to `glDeleteLists'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:803: undefined reference to `glXMakeCurrent'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:804: undefined reference to `glXDestroyContext'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:805: undefined reference to `XDestroyWindow'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:806: undefined reference to `XCloseDisplay'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:783: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:784: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:785: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:786: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxgears.c:762: undefined reference to `XOpenDisplay'
collect2: error: ld returned 1 exit status
Makefile:26: recipe for target 'glxgears' failed
make: *** [glxgears] Error 1
make: *** Waiting for unfinished jobs....
/tmp/ccQJ6ljO.o: In function `get_visual_attribs':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:707: undefined reference to `glXQueryExtensionsString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:725: undefined reference to `glXGetConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:728: undefined reference to `glXGetConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:729: undefined reference to `glXGetConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:730: undefined reference to `glXGetConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:736: undefined reference to `glXGetConfig'
/tmp/ccQJ6ljO.o:/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:737: more undefined references to `glXGetConfig' follow
/tmp/ccQJ6ljO.o: In function `CheckError':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:120: undefined reference to `glGetError'
/tmp/ccQJ6ljO.o: In function `find_best_visual':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1192: undefined reference to `XGetVisualInfo'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1224: undefined reference to `XFree'
/tmp/ccQJ6ljO.o: In function `create_context_flags':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:228: undefined reference to `XSetErrorHandler'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:239: undefined reference to `XSetErrorHandler'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:245: undefined reference to `glXIsDirect'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:246: undefined reference to `glXDestroyContext'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:197: undefined reference to `glXQueryExtensionsString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:200: undefined reference to `glXGetProcAddress'
/tmp/ccQJ6ljO.o: In function `create_context_with_config':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:292: undefined reference to `glXQueryExtensionsString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:306: undefined reference to `glXCreateNewContext'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:310: undefined reference to `glXIsDirect'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:311: undefined reference to `glXDestroyContext'
/tmp/ccQJ6ljO.o: In function `choose_fb_config':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:156: undefined reference to `glXChooseFBConfig'
/tmp/ccQJ6ljO.o: In function `print_screen_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:426: undefined reference to `glXGetVisualFromFBConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:427: undefined reference to `XFree'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:453: undefined reference to `XCreateColormap'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:456: undefined reference to `XCreateWindow'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:460: undefined reference to `glXMakeCurrent'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:602: undefined reference to `glXDestroyContext'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:603: undefined reference to `XFree'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:604: undefined reference to `XDestroyWindow'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:605: undefined reference to `XSync'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:461: undefined reference to `glXQueryServerString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:462: undefined reference to `glXQueryServerString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:463: undefined reference to `glXQueryServerString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:464: undefined reference to `glXGetClientString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:465: undefined reference to `glXGetClientString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:466: undefined reference to `glXGetClientString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:467: undefined reference to `glXQueryExtensionsString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:468: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:469: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:470: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:482: undefined reference to `glXGetProcAddressARB'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:484: undefined reference to `glXGetProcAddressARB'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:486: undefined reference to `glXGetProcAddressARB'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:488: undefined reference to `glXQueryVersion'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:498: undefined reference to `glGetString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:520: undefined reference to `glXIsDirect'
/tmp/ccQJ6ljO.o: In function `query_renderer':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:354: undefined reference to `glXGetProcAddressARB'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:357: undefined reference to `glXGetProcAddressARB'
/tmp/ccQJ6ljO.o: In function `print_screen_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:426: undefined reference to `glXGetVisualFromFBConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:427: undefined reference to `XFree'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:444: undefined reference to `XFree'
/tmp/ccQJ6ljO.o: In function `choose_xvisinfo':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:340: undefined reference to `glXChooseVisual'
/tmp/ccQJ6ljO.o: In function `choose_fb_config':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:158: undefined reference to `glXChooseFBConfig'
/tmp/ccQJ6ljO.o: In function `print_screen_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:563: undefined reference to `glGetString'
/tmp/ccQJ6ljO.o: In function `choose_xvisinfo':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:338: undefined reference to `glXChooseVisual'
/tmp/ccQJ6ljO.o: In function `print_screen_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:432: undefined reference to `glXCreateContext'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:426: undefined reference to `glXGetVisualFromFBConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:427: undefined reference to `XFree'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:571: undefined reference to `glGetIntegerv'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:579: undefined reference to `glGetIntegerv'
/tmp/ccQJ6ljO.o: In function `main':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1240: undefined reference to `XOpenDisplay'
/tmp/ccQJ6ljO.o: In function `mesa_hack':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1168: undefined reference to `glXChooseVisual'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1170: undefined reference to `XFree'
/tmp/ccQJ6ljO.o: In function `main':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1278: undefined reference to `XCloseDisplay'
/tmp/ccQJ6ljO.o: In function `mesa_hack':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1168: undefined reference to `glXChooseVisual'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1170: undefined reference to `XFree'
/tmp/ccQJ6ljO.o: In function `print_visual_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1063: undefined reference to `XGetVisualInfo'
/tmp/ccQJ6ljO.o: In function `print_fbconfig_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1108: undefined reference to `glXGetFBConfigs'
/tmp/ccQJ6ljO.o: In function `get_fbconfig_attribs':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:823: undefined reference to `glXQueryExtensionsString'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:829: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:831: undefined reference to `glXGetVisualFromFBConfig'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:843: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:846: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:847: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:848: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:849: undefined reference to `glXGetFBConfigAttrib'
/tmp/ccQJ6ljO.o:/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:850: more undefined references to `glXGetFBConfigAttrib' follow
/tmp/ccQJ6ljO.o: In function `print_fbconfig_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1133: undefined reference to `XFree'
/tmp/ccQJ6ljO.o: In function `get_fbconfig_attribs':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:869: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:870: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:871: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:872: undefined reference to `glXGetFBConfigAttrib'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:875: undefined reference to `glXGetFBConfigAttrib'
/tmp/ccQJ6ljO.o: In function `print_fbconfig_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1111: undefined reference to `XFree'
/tmp/ccQJ6ljO.o: In function `print_visual_info':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1094: undefined reference to `XFree'
/tmp/ccQJ6ljO.o: In function `main':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glxinfo.c:1242: undefined reference to `XDisplayName'
/tmp/ccp4JvWp.o: In function `print_shader_limit_list':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:376: undefined reference to `glGetIntegerv'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:377: undefined reference to `glGetError'
/tmp/ccp4JvWp.o: In function `print_program_limits':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:489: undefined reference to `glGetError'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:496: undefined reference to `glGetError'
/tmp/ccp4JvWp.o: In function `build_core_profile_extension_list':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:286: undefined reference to `glGetIntegerv'
/tmp/ccp4JvWp.o: In function `print_limits':
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:613: undefined reference to `glGetIntegerv'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:614: undefined reference to `glGetError'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:635: undefined reference to `glGetIntegerv'
/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos/glinfo_common.c:638: undefined reference to `glGetIntegerv'
collect2: error: ld returned 1 exit status
Makefile:30: recipe for target 'glxinfo' failed
make: *** [glxinfo] Error 1
make: Leaving directory '/tmp/mesa-20180312-31119-f5jl7h/mesa-17.2.3/xdemos'

@dpo
Copy link

dpo commented Jun 6, 2018

Any ideas how to fix this PR? CircleCI says

collect2: error: ld returned 1 exit status
Makefile:26: recipe for target 'glxgears' failed
...
collect2: error: ld returned 1 exit status
Makefile:30: recipe for target 'glxinfo' failed

@maxim-belkin
Copy link
Owner Author

rebased and pushed

Formula/libva.rb Outdated
depends_on "linuxbrew/xorg/libdrm"
depends_on "linuxbrew/xorg/libx11"
depends_on "linuxbrew/xorg/libxext"
depends_on "linuxbrew/xorg/libxfixes"
Copy link
Owner Author

Choose a reason for hiding this comment

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

See #384

Formula/libva.rb Outdated
--sysconfdir=#{etc}
--localstatedir=#{var}
--sysconfdir=#{prefix}/etc
--localstatedir=#{prefix}/var
Copy link
Owner Author

Choose a reason for hiding this comment

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

addressed in #384

Formula/mesa.rb Outdated
depends_on "linuxbrew/xorg/xextproto" => :build
depends_on "linuxbrew/xorg/xf86vidmodeproto" => :build
depends_on "linuxbrew/xorg/fixesproto" => :build
depends_on "linuxbrew/xorg/videoproto" => :build
Copy link
Owner Author

Choose a reason for hiding this comment

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

-proto dependencies are addressed in #382

@maxim-belkin
Copy link
Owner Author

Just as a reminder (to myself) this PR attempts to remove dependency of "default" mesa on llvm

@maxim-belkin maxim-belkin changed the title mesa: use libva 1.8.2 mesa: attempt to avoid dependency on llvm Sep 7, 2018
@sjackman
Copy link
Contributor

sjackman commented Sep 7, 2018

Is LLVM a build-time or run-time dependency?

@maxim-belkin
Copy link
Owner Author

According to the linkage information produced by brew for the current bottle - build-time.

@sjackman
Copy link
Contributor

sjackman commented Sep 7, 2018

Could you open a PR in that case to add => :build. That'd be a in improvement for bottle installations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do not merge (yet) "Do not merge" label for PRs that must be shipped together with other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants