Author mschatte
Recipients
Date 2007-04-18.19:03:11
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
When I put the following into setup.cfg:

---

[build_ext]
include_dirs = /home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu:/home/mschatte/myPackages/XSB/emu
link_objects = /home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu/saved.o/xsb.o

---

in order to link a c extension to another object which should reside on the users computer, I get the following error (tested on two kubuntu machines, python 2.4):

# python setup.py build
Distribution.parse_config_files():
  reading setup.cfg
options (after parsing config files):
option dict for 'build_ext' command:
  {'include_dirs': ('setup.cfg',
                    '/home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu:/home/mschatte/myPackages/XSB/emu'),
   'link_objects': ('setup.cfg',
                    '/home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu/saved.o/xsb.o')}
options (after parsing command line):
option dict for 'build' command:
  {}
option dict for 'build_ext' command:
  {'include_dirs': ('setup.cfg',
                    '/home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu:/home/mschatte/myPackages/XSB/emu'),
   'link_objects': ('setup.cfg',
                    '/home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu/saved.o/xsb.o')}
running build
Distribution.get_command_obj(): creating 'build' command object
running build_py
Distribution.get_command_obj(): creating 'build_py' command object
creating build
creating build/lib.linux-i686-2.4
copying dbms.py -> build/lib.linux-i686-2.4
copying __init__.py -> build/lib.linux-i686-2.4
copying f.py -> build/lib.linux-i686-2.4
copying interface.py -> build/lib.linux-i686-2.4
copying py2f.py -> build/lib.linux-i686-2.4
copying reasonable.py -> build/lib.linux-i686-2.4
creating build/lib.linux-i686-2.4/xsb_swig
copying xsb_swig/__init__.py -> build/lib.linux-i686-2.4/xsb_swig
copying xsb_swig/xsb.py -> build/lib.linux-i686-2.4/xsb_swig
running build_ext
Distribution.get_command_obj(): creating 'build_ext' command object
  setting options for 'build_ext' command:
    link_objects = /home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu/saved.o/xsb.o (from setup.cfg)
    include_dirs = /home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu:/home/mschatte/myPackages/XSB/emu (from setup.cfg)
building 'xsb_swig._xsb' extension
creating build/temp.linux-i686-2.4
creating build/temp.linux-i686-2.4/xsb_swig
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu -I/home/mschatte/myPackages/XSB/emu -I/usr/include/python2.4 -c xsb_swig/swig_xsb_wrap.c -o build/temp.linux-i686-2.4/xsb_swig/swig_xsb_wrap.o
In file included from xsb_swig/swig_xsb.h:25,
                 from xsb_swig/swig_xsb_wrap.c:2346:
/home/mschatte/myPackages/XSB/emu/cinterf.h:259: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:262: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:285: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:286: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:294: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:296: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:300: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:304: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:305: warning: function declaration isn’t a prototype
In file included from xsb_swig/swig_xsb_wrap.c:2346:
xsb_swig/swig_xsb.h:101: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:135: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:137: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:141: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:145: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:146: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb_wrap.c:2498: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb_wrap.c:5124: warning: function declaration isn’t a prototype
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/home/mschatte/myPackages/XSB/config/i686-pc-linux-gnu -I/home/mschatte/myPackages/XSB/emu -I/usr/include/python2.4 -c xsb_swig/swig_xsb.c -o build/temp.linux-i686-2.4/xsb_swig/swig_xsb.o
In file included from xsb_swig/swig_xsb.h:25,
                 from xsb_swig/swig_xsb.c:28:
/home/mschatte/myPackages/XSB/emu/cinterf.h:259: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:262: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:285: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:286: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:294: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:296: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:300: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:304: warning: function declaration isn’t a prototype
/home/mschatte/myPackages/XSB/emu/cinterf.h:305: warning: function declaration isn’t a prototype
In file included from xsb_swig/swig_xsb.c:28:
xsb_swig/swig_xsb.h:101: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:135: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:137: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:141: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:145: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.h:146: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.c: In function ‘intpointer’:
xsb_swig/swig_xsb.c:84: warning: function returns address of local variable
xsb_swig/swig_xsb.c: At top level:
xsb_swig/swig_xsb.c:140: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.c:174: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.c:176: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.c:180: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.c:184: warning: function declaration isn’t a prototype
xsb_swig/swig_xsb.c:185: warning: function declaration isn’t a prototype
Traceback (most recent call last):
  File "setup.py", line 11, in ?
    [ "xsb_swig/swig_xsb_wrap.c", "xsb_swig/swig_xsb.c" ]
  File "distutils/core.py", line 149, in setup
  File "distutils/dist.py", line 946, in run_commands
  File "distutils/dist.py", line 966, in run_command
  File "distutils/command/build.py", line 112, in run
  File "/usr/lib/python2.4/cmd.py", line 333, in run_command
    del help[cmd]
  File "distutils/dist.py", line 966, in run_command
  File "distutils/command/build_ext.py", line 279, in run
  File "distutils/command/build_ext.py", line 405, in build_extensions
  File "distutils/command/build_ext.py", line 502, in build_extension
  File "distutils/ccompiler.py", line 847, in link_shared_object
  File "distutils/unixccompiler.py", line 211, in link
TypeError: can only concatenate list (not "str") to list

---

maybe it isn't a bug, but link_objects is not well documented, so I wasn't able to find the appropriate syntax for setup.cfg

Best regards,

--
Markus Schatten, dipl. inf.
e-mail: markus.schatten@foi.hr
Faculty of Organization and Informatics
Varaždin, Croatia
History
Date User Action Args
2007-08-23 14:53:12adminlinkissue1703178 messages
2007-08-23 14:53:12admincreate