6

I'm trying to Compile Omnet++ 4.1 on Mountain Lion. When I type:

./configure 

I get the following error:

configure: error: Cannot build Tcl/Tk apps, probably due to misconfigured or missing X11 headers or libs. Check config.log for more info!

I remember compiling it on Lion without any problems, any ideas how to get it working on Mountain Lion?

Paul Roub
  • 35,100
  • 27
  • 72
  • 83
iFadi
  • 773
  • 2
  • 11
  • 20

3 Answers3

9

Found a solution for this over on the omnetpp google group, I'll paste it in here:

Hi all,

just tried Mountain Lion, which was released yesterday. Unfortunately, the new MacOSX does not include X11 by default. I really HATE this decision. As a result, it does not pass the Tcl/Tk checks when we do ./configure.

After hours of efforts, I finally figured out how to work around this:

  1. download and install XQuartz at http://xquartz.macosforge.org/landing/
  2. make a symbolic link at /usr/include: sudo ln -s /opt/X11/include/X11 /usr/include

and you are all set. In 2, you may also set some environment variables accordingly instead of making the symbolic link.

Future OMNet++ releases may consider setting associated environment variables so that the compiler looks for Xlib.h in /opt/X11/include/X11 with Mountain Lion.

Just successfully compiled the simulator and haven't encountered other problems yet.

Have fun, TS

Luís Marques
  • 891
  • 1
  • 8
  • 19
Evan Grim
  • 4,354
  • 3
  • 21
  • 19
  • Thx a lot :), worked like a charm. Although i searched the omnetpp google group, but i couldn't find it. – iFadi Aug 15 '12 at 11:38
  • Note that Luis made an edit to the original post that makes the symlink command more explicit. – Evan Grim Aug 20 '12 at 19:08
1

If you have the same problem on Linux (ubuntu) a solution is run this in the console:

sudo apt-get install build-essential gcc g++ bison flex perl tcl-dev tk-dev blt libxml2-dev zlib1g-dev openjdk-6-jre doxygen graphviz openmpi-bin libopenmpi-dev libpcap-dev
0

Installing XQuartz is still the solution to overcome this problem.

rebrid
  • 380
  • 6
  • 21