None
closed
nobody
None
2018-01-22
2018-01-12
Anonymous
No

I wanted to give this a try in my python scripts. I have cloned libupnpp from git, built installed it with --prefix=/usr/local.

Now when I try to build the bindings it looks for libupnpp header files in /usr/lib and not in /usr/local/lib. How can I fix that please?

Thanks and best regards
Martin

Discussion

  • medoc
    medoc
    2018-01-12

    Hi, same as the upplay issue, this works for me on Ubuntu (I don't know why actually, I don't see /usr/local/include in the command line -I options).

    If you are just interested in building the package and not in the issue itself, I think that the simplest approach would be to add a symbolic link from /usr/include/libupnpp to /usr/local/include/libupnpp :)

    Else what system are you using ?

     
  • Anonymous
    Anonymous
    2018-01-14

    This is somehow different. When I invoke make command it's running /usr/bin/swig -c++ -noruntime -python -I.. -I/usr/include -o upnpp_wrap.cxx ../python/upnpp-python.i

    Shouldn't there also be a -I/usr/local/include in the command?

    I'm doing this on Gentoo Linux. If nothing else help I will create a symbolic link. But maybe there is a way to tell swig to look in /usr/local/lib.

     
  • Anonymous
    Anonymous
    2018-01-14

    I played a bit with that problem. In directory python I added in the Makefile to the line AX_SWIG_PYTHON_OPT = -python the missing -I/usr/local/include.
    At least it builds now. Don't really know what it means. Shouldn't there always be a prefix dependent include o_O?

     
  • medoc
    medoc
    2018-01-14

    Yes, you are right, I was too hasty and had not seen the issue because I had not actually run swig (the swig output is a distributed file, not cleaned).

    There are multiple ways to fix this.

    The really right approach would be to find out where libupnpp is installed, either through pkg-config, or through a configure option, and substitute the appropriate result in Makefile.am

    As I am too lazy to add the configure option, and pkg-config may not be installed in all cases, I'd suggest the simpler solution which is to replace the following in python/Makefile.am

    SWIG_includes = -I$(top_srcdir) -I/usr/include

    With:

    SWIG_includes = -I$(top_srcdir) @CPPFLAGS@ -I/usr/include

    and then run configure as:

    configure CPPFLAGS=-I/usr/local/include
    

    This appears to work fine for me and I'll commit the Makefile.am change.

     
    Last edit: medoc 2018-01-14
  • medoc
    medoc
    2018-01-22

    • status: open --> closed
    • milestone: -->
     

Cancel   Add attachment