Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#35111 closed defect (worksforme)

mesa build failure due to using /usr/X11

Reported by: dougmencken@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc:
Port: mesa

Description

`port install mesa' fails on my side.

main.log is attached

Attachments (1)

main.log (333.6 KB) - added by dougmencken@… 12 years ago.

Download all attachments as: .zip

Change History (18)

Changed 12 years ago by dougmencken@…

Attachment: main.log added

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to jeremyhu@…

comment:2 Changed 12 years ago by jmroot (Joshua Root)

The messages about OpenGL/CGLTypes.h and such are just warnings; I guess makedepend doesn't understand framework includes.

The actual error is

:info:build ../glxext.c: In function ‘__glXWireToEvent’:
:info:build ../glxext.c:136: error: ‘xGLXBufferSwapComplete2’ undeclared (first use in this function)

possibly due to -I/usr/X11/include being in the compile command line but not -I${prefix}/include?

It's also not using the right compiler, but that may be unrelated.

comment:3 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: newclosed
Summary: mesa build failure due to missing headers (OpenGL/CGLTypes.h etc.)mesa build failure due to using /usr/X11

Did you do something non-standard? It works fine here:

:info:build /usr/bin/clang  -c -I. -Iinclude -I.. -I../../../include -I../../../include/GL/internal -I../../../src/mesa -I../../../src/mesa/main -I../../../src/mapi -I../../../src/mapi/glapi    -std=c99 -fvisibility=hidden -g3 -gdwarf-2 -Os -ffast-math -fno-strict-aliasing -Wall -Wmissing-prototypes -I/opt/local/include -I/opt/local/include -fPIC -arch x86_64  -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE -DGLX_ALIAS_UNSUPPORTED -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL   ../glxext.c -o ../glxext.o

Do the following:

sudo port -v selfupdate
sudo port -v clean mesa
sudo port -v install mesa

comment:4 Changed 12 years ago by dougmencken@…

Resolution: worksforme
Status: closedreopened

Did the following:

# port -v selfupdate # port -v clean mesa # port -v install mesa

Got: ... ../glxext.c: In function ‘glXWireToEvent’: ../glxext.c:136: error: ‘xGLXBufferSwapComplete2’ undeclared (first use in this function) ../glxext.c:136: error: (Each undeclared identifier is reported only once ../glxext.c:136: error: for each function it appears in.) ../glxext.c:136: error: ‘awire’ undeclared (first use in this function) ../glxext.c:136: error: syntax error before ‘)’ token make[3]: * glxext.o Error 1 make[3]: * Waiting for unfinished jobs.... ../glxcmds.c:578: warning: ‘glXIsDirect’ defined but not used ...

WORKSFORME is not a reason to close this.

comment:5 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: reopenedclosed

It installs fine for me on Tiger through Mountain Lion, and you are not providing any information about your setup. All I can conclude from what you've provided (and the fact that you're the only person with this issue) is that your system is borked.

I notice that your log shows "CC=/usr/bin/gcc-4.2" and is missing the "-I/opt/local/include" which to me indicates that your ${configure.cppflags} isn't set. This is in the Portfile:

pre-build {
    build.args-append \
        CC="${configure.cc} ${configure.cppflags}" \
        CXX="${configure.cxx} ${configure.cppflags}"
}

If that doesn't help you fix your system, I suggest you ask for help on macports-users, instead of filing a bug report. There is nothing to go on here. It builds fine for me on Tiger/intel and Leopard/universal (intel+ppc universal), and there are reports of it building fine on Tiger/ppc. It seems to me that something is broken outside of mesa that you need to uncover.

comment:6 Changed 12 years ago by jmroot (Joshua Root)

-I/opt/local/include is explicitly deleted from configure.cppflags on line 51 of the portfile.

comment:7 Changed 12 years ago by dougmencken@…

Resolution: worksforme
Status: closedreopened

It builds fine for me on Tiger/intel and Leopard/universal (intel+ppc universal), and there are reports of it building fine on Tiger/ppc. and you are not providing any information about your setup

I'm on OS X 10.5.8 (a.k.a. "Leopard OS" @ PowerPC. It is obviously known from my uploaded main.log. If you, mac port guys, can't parse ":debug:clean OS darwin/9.8.0 (Mac OS X 10.5) arch powerpc", who can then? Me?

is missing the "-I/opt/local/include" which to me indicates that your ${configure.cppflags} isn't set

How can I check that? I'm just installed MacPorts, and issued 'port install alienarena', and it faild on mesa stage. Fully fresh MacPorts, I had nothing in /opt before.

Re-opening. If you need more info, just say it. You if don't want to support me, just close as "WONTFIX", not as "WORKSFORME".

comment:8 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

There's no need for your hostility.

jmr's right that -I/opt/local/include is explicitly deleted from CPPFLAGS, so my observation of your build command was in error. The '-I/opt/local/include' should be coming from INSTALL_DIR=/opt/local

...
INSTALL_DIR = /usr/X11

X11_DIR = $(INSTALL_DIR)

# Compiler and flags
CC = $(shell xcrun -find cc)
CXX = $(shell xcrun -find c++)

...

INCLUDE_FLAGS = -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
OPT_FLAGS = -g3 -gdwarf-2 -Os -ffast-math -fno-strict-aliasing
WARN_FLAGS = -Wall -Wmissing-prototypes

CFLAGS = -std=c99 -fvisibility=hidden \
	$(OPT_FLAGS) $(WARN_FLAGS) $(INCLUDE_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) $(EXTRA_CFLAGS)
CXXFLAGS = -fvisibility=hidden \
	$(OPT_FLAGS) $(WARN_FLAGS) $(INCLUDE_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) $(EXTRA_CFLAGS)

So the CC, CXX, and INSTALL_DIR specified on the build command line is *not* being honored:

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_mesa/mesa/work/Mesa-8.0.3" && /usr/bin/make -j2 -w darwin INSTALL_DIR=/opt/local RC_CFLAGS="-arch ppc" PYTHON2="/opt/local/bin/python2.7" CC="/usr/bin/gcc-4.2 " CXX="/usr/bin/g++-4.2 " 

What version of make is at /usr/bin/make? What version of Xcode do you have installed? The only thing I can think of is that you have a buggy /usr/bin/make ... I have XCode 3.1.4 on my Leopard/intel box, and it builds mesa fine...

comment:9 Changed 12 years ago by dougmencken@…

What version of make is at /usr/bin/make?

sh-3.2# which make
/usr/bin/make
sh-3.2# make --version
GNU Make 3.82
Built for powerpc-apple-darwin9
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
sh-3.2# which gcc
/usr/bin/gcc
sh-3.2# gcc --version
powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What version of Xcode do you have installed?

How do I know it? Above I posted the output of gcc --version.

comment:10 Changed 12 years ago by jmroot (Joshua Root)

xcodebuild -version

But your /usr/bin/make is not the one Apple ships. They don't ship anything that's GPLv3.

Also /usr/bin/gcc on my Leopard ppc box with Xcode 3.1.4 is linked to gcc-4.0, FYI.

comment:11 Changed 12 years ago by dougmencken@…

sh-3.2# xcodebuild -version
Xcode 3.1.4
Component versions: DevToolsCore-1204.0; DevToolsSupport-1186.0
BuildVersion: 9M2809

comment:12 Changed 12 years ago by dougmencken@…

They don't ship anything that's GPLv3.

Weird... But anyway, how does GNU make version violate smth? Why are other packages perfect: I just installed Subversion with all deps.

comment:13 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: worksforme
Status: reopenedclosed

Ok, your bits in /usr don't match what should be there. If you want to replace /usr/bin/* with your own builds, that's fine, but that's not supported. If you want a supported configuration, please reinstall XCode 3.1.4.

comment:14 in reply to:  12 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Replying to dougmencken@…:

They don't ship anything that's GPLv3.

Weird... But anyway, how does GNU make version violate smth?

It doesn't violate something. It just means your configuration isn't supported, and the version of make that you installed seems to have a bug in it.

Why are other packages perfect: I just installed Subversion with all deps.

Probably because they don't build in a way that triggers that bug in the version of make you installed.

comment:15 Changed 12 years ago by dougmencken@…

Sorry I tried to use MacPorts.

Seems like there are so much "works for me" and "supported configuration" guys w/o any help.

Sorry again.

comment:16 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Huh? You *broke* your system yourself, and I even told you how to fix it. I told you to reinstall XCode 3.1.4. That will replace your broken /usr/bin/make with the correct version.

comment:17 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

There's nothing that MacPorts can do to fix this issue. The error is on your end with bugs in software that you have installed. We can't protect you from yourself.

If you start replacing your development tools with ones you've built yourself, then you need to expect that such a configuration won't be supported by anybody (MacPorts, fink, Homebrew, ...) and you need to have the experience and knowledge to fix fallout yourself. If you don't have that experience and knowledge, then just do the fix that I gave you, and hopefully things will "just work" for you...

Note: See TracTickets for help on using tickets.