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 build error in CentOS6: dependency and undefined "setUnsafeAlgebra()" #374

Closed
5 tasks done
Gwang-Jin opened this issue Jun 2, 2018 · 16 comments
Closed
5 tasks done
Assignees

Comments

@Gwang-Jin
Copy link
Contributor

Gwang-Jin commented Jun 2, 2018

Hello.

Although glproto is installed in my system, when building mesa, I met the error messages

configure: error: Package requirements (glproto >= 1.4.14) were not met:

No package 'glproto' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLPROTO_CFLAGS
and GLPROTO_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

And

gallivm/lp_bld_misc.cpp:833:13: error: 'class llvm::FastMathFlags' has no member named 'setUnsafeAlgebra'
       flags.setUnsafeAlgebra();
             ^

Thank you.

https://gist.github.com/091234dc707b47899d6fda3f19b8f2bf

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?

To help us debug your issue please explain:

  • What you were trying to do (and why)
  • What happened (include command output)
  • What you expected to happen
  • Step-by-step reproduction instructions (by running brew install commands)
@dpo
Copy link

dpo commented Jun 5, 2018

mesa doesn't build at all. It's missing several dependencies. Currently, I've added

diff --git a/Formula/mesa.rb b/Formula/mesa.rb
index c0e705b..62543f6 100644
--- a/Formula/mesa.rb
+++ b/Formula/mesa.rb
@@ -18,6 +18,9 @@ class Mesa < Formula
   depends_on "bison" => :build
   depends_on "libtool" => :build

+  depends_on "linuxbrew/xorg/damageproto"
+  depends_on "linuxbrew/xorg/dri2proto"
+  depends_on "linuxbrew/xorg/glproto"
   depends_on "linuxbrew/xorg/libdrm"
   depends_on "systemd" # provides libudev <= needed by "gbm"
   depends_on "linuxbrew/xorg/libsha1"

but the build still fails with

Last 15 lines from /home/mgi.polymtl.ca/doorba/.cache/Homebrew/Logs/mesa/03.make:
libtool: link: ranlib .libs/libgalliumvl.a
libtool: link: ( cd ".libs" && rm -f "libgalliumvl.la" && ln -s "../libgalliumvl.la" "libgalliumvl.la" )
gallivm/lp_bld_misc.cpp: In function 'LLVMOpaqueBuilder* lp_create_builder(LLVMContextRef, lp_float_mode)':
gallivm/lp_bld_misc.cpp:833:13: error: 'class llvm::FastMathFlags' has no member named 'setUnsafeAlgebra'
       flags.setUnsafeAlgebra();
             ^
make[4]: *** [gallivm/lp_bld_misc.lo] Error 1
make[4]: Leaving directory `/tmp/mesa-20180605-9622-1m28ai0/mesa-17.2.3/src/gallium/auxiliary'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/mesa-20180605-9622-1m28ai0/mesa-17.2.3/src/gallium'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/mesa-20180605-9622-1m28ai0/mesa-17.2.3/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/mesa-20180605-9622-1m28ai0/mesa-17.2.3/src'
make: *** [all-recursive] Error 1

#351 makes some updates but it seems to have been abandoned.

@nir-krakauer
Copy link

My build of mesa in Ubuntu fails with a different message:
ImportError: No module named setuptools
https://gist.github.com/1a74473593d7c0bd6d675c43f0cd9822

@Gwang-Jin
Copy link
Contributor Author

Gwang-Jin commented Jun 7, 2018

@nir-krakauer Did you try to install setuptools using brewed pip?

pip install setuptools

@nir-krakauer
Copy link

pip3 install setuptools returns:

Requirement already satisfied: setuptools in ./.linuxbrew/lib/python3.6/site-packages (39.2.0)

@Gwang-Jin
Copy link
Contributor Author

@nir-krakauer Could you please run not pip3 but pip2?

@Gwang-Jin Gwang-Jin changed the title mesa build error in CentOS6: No package 'glproto' found mesa build error in CentOS6: dependency and undefined "setUnsafeAlgebra()" Jun 7, 2018
@nir-krakauer
Copy link

Thanks, brew reinstall python@2 did fix the problem.

@nir-krakauer
Copy link

Now I also get
configure: error: Package requirements (glproto >= 1.4.14) were not met: No package 'glproto' found
https://gist.github.com/d9620a94307e088d8a93642ba2b4b573

@Gwang-Jin
Copy link
Contributor Author

@nir-krakauer Yes. As a recommendation from @dpo,

brew edit mesa

adding to mesa.rb

  depends_on "linuxbrew/xorg/damageproto"
  depends_on "linuxbrew/xorg/dri2proto"
  depends_on "linuxbrew/xorg/glproto"

. Then you would meet the error message we met.

@Gwang-Jin
Copy link
Contributor Author

Gwang-Jin commented Jun 8, 2018

I found setUnsafeAlgebra() as member function of class llvm::FastMathFlags in llvm-3.9. And this is not member function in llvm-6.0. So this seems to be a problem of llvm version.

@dpo
Copy link

dpo commented Jun 8, 2018

If that's the case, you should be able to declare something like

depends_on "llvm@3.9"

@maxim-belkin
Copy link
Owner

good catch @Gwang-Jin!

@Gwang-Jin
Copy link
Contributor Author

Gwang-Jin commented Jun 8, 2018

In llvm@3.9, llvm@4, and llvm@5, setUnsafeAlgebra() is defined as a member function of class llvm::FastMathFlags. Only in llvm@6 it is deleted.
Now brew install llvm@3.9 seems to have an issue:

Undefined reference to __cxa_guard_acquire and __cxa_guard_release

@Gwang-Jin
Copy link
Contributor Author

I succeeded with llvm@4 at installing mesa.

@dpo
Copy link

dpo commented Jun 8, 2018

Could you please post your diff (or submit a PR)?

@Gwang-Jin
Copy link
Contributor Author

Ok. I submitted #375.

@maxim-belkin
Copy link
Owner

This issue has been resolved in #375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants