Jon,
> On 8 Mar 2017, at 01:34, Jon Loeliger <[email protected]> wrote: > > On Mon, Mar 6, 2017 at 2:57 PM, Jon Loeliger <[email protected]> wrote: > > Hi Billy, > > Soooo, despite the Peanut Gallery, I'm not yet crazy... :-) > > Now all we have to do is find the missing dependency in a Makefile! :-) > > Thanks, > jdl > > I may not be crazy (yet), but I am in a vacuum. > > OK, as a review, here is the error message: > > running build_ext > building 'vpp_api' extension > creating build > creating build/temp.linux-x86_64-2.7 > creating build/temp.linux-x86_64-2.7/vpp_papi > gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 > -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv > -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 > -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC > -I/var/lib/jenkins/workspace/build-ngr-rpm/build_root/BUILD/vpp/build-root/install-vpp-native/vpp/include/ > -I/usr/include/python2.7 -c vpp_papi/pneum_wrap.c -o > build/temp.linux-x86_64-2.7/vpp_papi/pneum_wrap.o > creating build/lib.linux-x86_64-2.7 > gcc -pthread -shared -Wl,-z,relro > build/temp.linux-x86_64-2.7/vpp_papi/pneum_wrap.o > -L/var/lib/jenkins/workspace/build-ngr-rpm/build_root/BUILD/vpp/build-root/install-vpp-native/vpp/lib64 > -L. -lpneum -lpython2.7 -o build/lib.linux-x86_64-2.7/vpp_api.so > /bin/ld: cannot find -lpneum > collect2: error: ld returned 1 exit status > error: command 'gcc' failed with exit status 1 > make[7]: *** [install-exec-local] Error 1 > > > So, let's pick on install-exec-local. That is from > src/vpp-api/python/Makefile.am: > > install-exec-local: > cd $(srcdir); \ > mkdir -p $(pythondir); \ > mkdir -p $(pyexecdir); \ > PYTHONUSERBASE=$(prefix) \ > python setup.py build_ext -L $(libdir) \ > -I $(prefix)/include/ install --user > > And the setup.py in that directory says: > > setup (name = 'vpp_papi', > version = '1.3', > description = 'VPP Python binding', > author = 'Ole Troan', > author_email = '[email protected]', > test_suite = 'tests', > packages=['vpp_papi'], > ext_modules = [ > Extension( > 'vpp_api', > sources = ['vpp_papi/pneum_wrap.c'], > libraries = ['pneum'], > )], > long_description = '''VPP Python language binding.''', > zip_safe = True, > ) > > Good, it lists pneum. But the problem is, we shouldn't run this > setup.py until after pneum is fully linked and on disk. This happened > too soon: > > gcc -pthread -shared -Wl,-z,relro > build/temp.linux-x86_64-2.7/vpp_papi/pneum_wrap.o > -L/var/lib/jenkins/workspace/build-ngr-rpm/build_root/BUILD/vpp/build-root/install-vpp-native/vpp/lib64 > -L. -lpneum -lpython2.7 -o build/lib.linux-x86_64-2.7/vpp_api.so > /bin/ld: cannot find -lpneum > > > Which means, the rule for vpp_api.so's dependencies, isn't listing the > real pneum library properly. > > I have no idea where that is supposed to take place yet. I have also seen this error. What I suspect happens is that while pneum is already built and that the build dependency is correct, the library isn't installed under the install- directory yet. I didn't manage to reproduce it right now, but would you mind trying this to see if it works: diff --git a/src/vpp-api/python/Makefile.am b/src/vpp-api/python/Makefile.am index 5407682..c60e4f4 100644 --- a/src/vpp-api/python/Makefile.am +++ b/src/vpp-api/python/Makefile.am @@ -39,7 +39,7 @@ libpneum_la_LDFLAGS = -module libpneum_la_CPPFLAGS = # TODO: Support both Python 2 and 3. -install-exec-local: +install-exec-local: install-libLTLIBRARIES cd $(srcdir); \ mkdir -p $(pythondir); \ mkdir -p $(pyexecdir); \ (In other news I am looking at using CFFI instead, and then the whole vpp_api.so would go away). Cheers, Ole
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ vpp-dev mailing list [email protected] https://lists.fd.io/mailman/listinfo/vpp-dev
