Opened 10 years ago

Closed 10 years ago

#40680 closed defect (fixed)

aterm @1.0.1: fatal error: 'X11/Intrinsic.h' file not found

Reported by: dazuelos (dan) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc:
Port: aterm

Description (last modified by ryandesign (Ryan Carsten Schmidt))

New install of MacPorts 2.2.0 on /opt/local on Lion (10.8.3) + Xcode (4.6.3) + XQuartz (2.7.4). The X11 include coming with XQuartz are within /opt/X11/include/X11. The MacPorts X11 include files are within /opt/local/include/X11.

WIthin the first one is an Intrinsic.h include. WIthin the last one there is no such include file.

After all the relevant dependencies are already built and installed, the command:

 port -vs build aterm build.jobs=1

gives:

[...]
checking for X... libraries /opt/local/lib, headers /opt/local/include
[...]
/usr/bin/clang -DHAVE_CONFIG_H  -c -pipe -Os -arch x86_64 -Wall -DNO_DEBUG_OUTPUT  -I/opt/local/include -I/opt/local/include     -I/opt/local/include  -I. -I.. -I.  command.c
In file included from command.c:50:
./rxvt.h:142:10: fatal error: 'X11/Intrinsic.h' file not found
#include <X11/Intrinsic.h>      /* Xlib, Xutil, Xresource, Xfuncproto */
         ^
1 error generated.
make[1]: *** [command.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_aterm/aterm/work/aterm-1.0.1/src'
[...]

The triple use of -I/opt/local/include doesn't seem to be usefull and moreover doesn't point to the right X11 include directory.

How may I help to fix this?

Attachments (2)

main.log (20.6 KB) - added by dazuelos (dan) 10 years ago.
aterm install log
main.2.log (32.9 KB) - added by dazuelos (dan) 10 years ago.
aterm install log

Download all attachments as: .zip

Change History (15)

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

Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…
Port: aterm added
Status: newassigned
Summary: Build of aterm@1.0.1 failingaterm @1.0.1: fatal error: 'X11/Intrinsic.h' file not found

You're welcome to use the X11 installed by XQuartz, but by design, MacPorts will only use its own X11, not XQuartz or any other X11 you may have installed elsewhere. The triple -I/opt/local/include is not harmful, so no change needs to me made there. The only problem is that we didn't realize that aterm requires Intrinsic.h, so all we need to do is add a dependency on the port that provides that, which is xorg-libXt.

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Curiously the Snow Leopard and Lion buildbots built aterm just fine without xorg-libXt. I'm waiting to see what the Mountain Lion buildbot says.

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

In the mean time you can fix the build on your system by installing xorg-libXt before building aterm.

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

It also built fine on the Mountain Lion buildbot, without xorg-libXt: https://build.macports.org/builders/buildports-mtln-x86_64/builds/8681

So I guess there is some kind of opportunistic linking going on. I should compare the log from the buildbot with the one from my system to see if I can determine what it is.

comment:5 in reply to:  4 Changed 10 years ago by dazuelos (dan)

Replying to ryandesign@…: [...]

So I guess there is some kind of opportunistic linking going on. I should compare the log from the buildbot with the one from my system to see if I can determine what it is.

I agree with this analysis and try to locate what may interfere. On my system, XQuartz is installed, and Intrinsic.h is found within /opt/X11/include/X11 (which is also by the way of symbolic links /usr/X11/include/X11).

During the Xquartz install 2 symbolic links are created:

% ls -ld X11*
lrwxr-xr-x  1 root  wheel  8 Oct  3 14:04 X11 -> /opt/X11
lrwxr-xr-x  1 root  wheel  8 Oct  3 14:04 X11R6 -> /opt/X11
%

Since I haven't yet installed a full X11 on MacPorts, my PATH does contain the XQuartz X11 binary PATH before the MacPorts binary PATHes.

% echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/local/bin:/opt/local/bin:/opt/local/sbin
%

On a correct build on Mountain Lion, what is the PATH of Intrinsic.h?

comment:6 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

As I said before, MacPorts does not make use of any part of your XQuartz installation (nor does it use your $PATH variable).

If your MacPorts prefix is /opt/local and you install xorg-libXt, you'll get /opt/local/include/X11/Intrinsic.h.

Unfortunately mtln build 8681 above does not include a build log. It says it won't build it again because it already built it before. But I don't know when that was so I can't find the log so I can't compare it to mine.

comment:7 in reply to:  6 Changed 10 years ago by dazuelos (dan)

Replying to ryandesign@…:

Unfortunately mtln build 8681 above does not include a build log. It says it won't build it again because it already built it before. But I don't know when that was so I can't find the log so I can't compare it to mine.

I have the opportunity to build from scratch MacPorts 2.2.0 (on top of Mountain Lion 10.8.x, where x ∊ [3;5]) on a test system.

What kind of build log level might be helpfull to analyze this dependency problem?

comment:8 Changed 10 years ago by dazuelos (dan)

On Lion 10.8.5 + Xcode 5.0, MacPorts 2.2.0 installed freom scratch in /opt/local/bin.

$ port -d selfupdate
$ port -d install aterm
[...]
$ port installed
The following ports are currently installed:
  aterm @1.0.1_0 (active)
  bzip2 @1.0.6_0 (active)
  db46 @4.6.21_8 (active)
  db_select @0.1_2 (active)
  expat @2.1.0_0 (active)
  gettext @0.18.3.1_1 (active)
  libedit @20121213-3.0_0 (active)
  libiconv @1.14_0 (active)
  libxml2 @2.9.1_0 (active)
  ncurses @5.9_2 (active)
  openssl @1.0.1e_1 (active)
  python27 @2.7.5_1 (active)
  python_select @0.3_2 (active)
  sqlite3 @3.8.0.2_0 (active)
  xorg-kbproto @1.0.6_0 (active)
  xorg-libice @1.0.8_0 (active)
  xorg-libpthread-stubs @0.3_0 (active)
  xorg-libsm @1.2.1_0 (active)
  xorg-libX11 @1.6.2_0 (active)
  xorg-libXau @1.0.8_0 (active)
  xorg-libxcb @1.9.1_0+python27 (active)
  xorg-libXdmcp @1.1.1_0 (active)
  xorg-libXext @1.3.2_0 (active)
  xorg-xcb-proto @1.8_0+python27 (active)
  xorg-xextproto @7.2.1_0 (active)
  xorg-xproto @7.0.24_0 (active)
  xz @5.0.5_0 (active)
  zlib @1.2.8_0 (active)
$ type port
port is hashed (/opt/local/bin/port)
$ type aterm
-bash: type: aterm: not found
$

The build and install ran with not any error displayed, but aterm is neither built nor installed.

comment:9 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

It would be helpful if you could rebuild aterm, without parallel building, and save and attach its main.log file:

sudo port -f uninstall aterm
sudo port -kn install aterm build.jobs=1
port logfile aterm

I'm not sure why the aterm program didn't get installed. What do you get when you run "port contents aterm"?

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

Make that:

sudo port -f uninstall aterm
sudo port -kns install aterm build.jobs=1
port logfile aterm

(adding "-s" to make sure you're building from source, not from our pre-compiled binary, which I see is missing the aterm binary too)

Changed 10 years ago by dazuelos (dan)

Attachment: main.log added

aterm install log

comment:11 Changed 10 years ago by dazuelos (dan)

I attached the result of these 3 clean build steps (the one with -s). This built was run once more on top of Lion (10.8.3) + Xcode (4.6.3) (for practical reasons) where the uniq other built is openssl:

$ port installed
The following ports are currently installed:
  aterm @1.0.1_0 (active)
  bzip2 @1.0.6_0 (active)
  db46 @4.6.21_8 (active)
  db_select @0.1_2 (active)
  expat @2.1.0_0 (active)
  gettext @0.18.3.1_1 (active)
  libedit @20121213-3.0_0 (active)
  libiconv @1.14_0 (active)
  libxml2 @2.9.1_0 (active)
  logwatch @7.3.6_2 (active)
  ncurses @5.9_2 (active)
  openssl @1.0.1e_1 (active)
  python27 @2.7.5_1 (active)
  python_select @0.3_2 (active)
  sqlite3 @3.8.0.2_0 (active)
  xorg-kbproto @1.0.6_0 (active)
  xorg-libice @1.0.8_0 (active)
  xorg-libpthread-stubs @0.3_0 (active)
  xorg-libsm @1.2.1_0 (active)
  xorg-libX11 @1.6.2_0 (active)
  xorg-libXau @1.0.8_0 (active)
  xorg-libxcb @1.9.1_0+python27 (active)
  xorg-libXdmcp @1.1.1_0 (active)
  xorg-libXext @1.3.2_0 (active)
  xorg-xcb-proto @1.8_0+python27 (active)
  xorg-xextproto @7.2.1_0 (active)
  xorg-xproto @7.0.24_0 (active)
  xz @5.0.5_0 (active)
  zlib @1.2.8_0 (active)
$

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

Oh oops, that's not a clean build. Could you try once more?

sudo port clean aterm
sudo port -f uninstall aterm
sudo port -kns install aterm build.jobs=1
port logfile aterm

Changed 10 years ago by dazuelos (dan)

Attachment: main.2.log added

aterm install log

comment:13 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Thanks. Yours says:

:info:configure checking for working Xlocale... no

Mine says:

:info:configure checking for working Xlocale... yes

Looking for Xlocale:

$ locate Xlocale
/opt/local/include/X11/Xlocale.h
$ port provides $(locate Xlocale)
/opt/local/include/X11/Xlocale.h is provided by: xorg-libX11

Looking at what aterm links with:

$ which aterm
/opt/local/bin/aterm
$ otool -L $(which aterm)
/opt/local/bin/aterm:
	/opt/local/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
	/opt/local/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
	/opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
	/opt/local/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)

So I added library dependencies on xorg-libice and xorg-libX11 and a build dependency on xorg-libXt in r112151.

Thanks for your help tracking this down.

Note: See TracTickets for help on using tickets.