Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Problems with Python ctypes is not limited to Raspberry Pi platfform - tested on qemu vexpress
Date: Sat, 02 Nov 2013 20:45:33 +0100	[thread overview]
Message-ID: <5275565D.4060304@mind.be> (raw)
In-Reply-To: <CAMduVEdzrDhzbXv6buXJTXxB19fHbmee0Q4+qoA4Fsw3ECRmaQ@mail.gmail.com>

On 30/10/13 23:53, Wojciech Zabolotny wrote:
[snip]
> 4. I have compiled the system with "make" (well, "make -j 12" doesn't
> work for current version of buildroot - it fails with following error
> messages:
> $ make -j 12
> [...]
>>>> host-automake 1.12.6 Building
> PATH=/tmp/rr/buildroot/output/host/bin:/tmp/rr/buildroot/output/host/usr/bin:/home/wzab/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
> LD_LIBRARY_PATH="/tmp/rr/buildroot/output/host/usr/lib:"
> PKG_CONFIG="/tmp/rr/buildroot/output/host/usr/bin/pkg-config"
> PKG_CONFIG_SYSROOT_DIR="/"
> PKG_CONFIG_LIBDIR="/tmp/rr/buildroot/output/host/usr/lib/pkgconfig"
> PERLLIB="/tmp/rr/buildroot/output/host/usr/lib/perl"  /usr/bin/make
> -j9  -C /tmp/rr/buildroot/output/build/host-automake-1.12.6/
> make[1]: Entering directory
> `/tmp/rr/buildroot/output/build/host-automake-1.12.6'
> make[1]: warning: -jN forced in submake: disabling jobserver mode.
> make[1]: *** read jobs pipe: No such file or directory.  Stop.
> make[1]: *** Waiting for unfinished jobs....
>    GEN      automake
>    GEN      t/ax/shell-no-trail-bslash
> make: *** [/tmp/rr/buildroot/output/build/host-automake-1.12.6/.stamp_built]
> Broken pipe
> )

  That's weird... The top-level Makefile has .NOTPARALLEL, so your -j12 
should be ignored...

[snip]
> # vi /usr/lib/python2.7/ctypes/util.py
>
> changing the mach_map dictionary:
>
>              mach_map = {
>                  'x86_64-64': 'libc6,x86-64',
>                  'ppc64-64': 'libc6,64bit',
>                  'sparc64-64': 'libc6,64bit',
>                  's390x-64': 'libc6,64bit',
>                  'ia64-64': 'libc6,IA-64',
>                  'armv7l-32':'libc0',
>                  }
>              abi_type = mach_map.get(machine, 'libc6')

  The problem with this, of course, is that it should be libc0 for uClibc 
but libc6 for glibc, and that what you have here only works for armv7l so 
something similar should be added for all other architectures.

  Instead, I think it's better to add a third fallback option (in case 
neither ldconfig nor gcc produce a result) that uses glob.glob to find a 
matching library in /usr/lib or /lib.


  Regards,
  Arnout

>
> and run Python again:
> # python
> Python 2.7.3 (default, Oct 30 2013, 23:17:05)
> [GCC 4.7.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import ctypes.util
>>>> ctypes.util.find_library('m')
> 'libm.so.0'
>>>>
>
> So after the above modification, find_library works.
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

      reply	other threads:[~2013-11-02 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 22:53 [Buildroot] Problems with Python ctypes is not limited to Raspberry Pi platfform - tested on qemu vexpress Wojciech Zabolotny
2013-11-02 19:45 ` Arnout Vandecappelle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5275565D.4060304@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox