'libxml/xmlwriter.h' not found after updating to Xcode 7.0.1 and El Capitan

397 views
Skip to first unread message

Marco Giordani

unread,
Oct 20, 2015, 3:57:30 AM10/20/15
to ns-3-users
Hi everybody. I just updated my MacBook to El Capitan and I have now Xcode 7.0.1. When compiling my ns-3 script, I get the following error (I didn't have before the update):

In file included from ../src/config-store/model/config-store.cc:11:
    ../src/config-store/model/xml-config.h:5:10: fatal error: 'libxml/xmlwriter.h' file not found
    #include <libxml/xmlwriter.h>
             ^
    1 error generated.
    Waf: Leaving directory `/Users/marcogiordani/final-ns3-mmwave-dir/build'
    Build failed
     -> task in 'ns3-config-store' failed (exit status 1): 
        {task 4469735696: cxx config-store.cc -> config-store.cc.1.o}
    ['/usr/bin/g++', '-Wall', '-Werror', '-Wno-potentially-evaluated-expression', '-Wno-unused-local-typedefs', '-fPIC', '-I.', '-I..', '-I/usr/include/libxml2', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_SQLITE3=1', '../src/config-store/model/config-store.cc', '-c', '-o', 'src/config-store/model/config-store.cc.1.o']
Any suggestion to this issue?

Konstantinos

unread,
Oct 20, 2015, 4:16:44 AM10/20/15
to ns-3-users
Hi Marco,

Which NS-3 release are you working with? 
This might be a known issue that has been fixed with the NS-3.24.1 release as there have been some errors with the new Xcode release.

Regards,
K.

Marco Giordani

unread,
Oct 20, 2015, 4:18:55 AM10/20/15
to ns-3-...@googlegroups.com
Thanks Konstantinos, 
I had already fixed this issue following the guide you have posted, but I still get this problem.
Regards,
Marco
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/2rwymrLjZXk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Konstantinos

unread,
Oct 20, 2015, 4:22:04 AM10/20/15
to ns-3-users
Does that mean you work with NS-3.24.1 and you still have issues in main ns-3 modules such as config-store?
Please give more details of your system (gcc and python versions)
Marco
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Marco Giordani

unread,
Oct 20, 2015, 4:35:15 AM10/20/15
to ns-3-...@googlegroups.com
Dear Konstantinos,
I am not working with version 3.24 but with an older one. Anyway, everything worked fine before I updated to the new OSX El Capitan.
My system has the following specs:
  • gcc version: 4.2.1
  • Python version: 2.7.10

Thanks,
Marco

To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Tommaso Pecorella

unread,
Oct 20, 2015, 8:33:33 AM10/20/15
to ns-3-users
xmlwriter.h is part of an external library (libxml2 usually).
It is possible that the library has been removed by the Capitain installer, especially if you did install it under /usr through some package manager (fink, homebrew, MacPorts, etc.) or if you did compile and install it by yourself.
The "obvious" solution is to reinstall it and reconfigure ns-3.
As a side note, upgrade to 3.24.1. There is really no excuse to be stuck to an older and buggy version.

T.
Marco
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Marco Giordani

unread,
Oct 20, 2015, 9:03:43 AM10/20/15
to ns-3-...@googlegroups.com
Dear Tommaso,
thanks for your help. I just solved the problem by typing on the Terminal:

xcode-select —install

For some reason, when updating to Xcode 7.0.1, the CommandLineTool hadn’t been updated too, so I did it manually. Now everything works fine.
Thanks for your support.
Marco
Reply all
Reply to author
Forward
0 new messages