Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Build error when trying to build the py-smbus package of i2c-tools
Date: Fri, 21 Jun 2013 11:49:35 +0200	[thread overview]
Message-ID: <51C421AF.20904@mind.be> (raw)
In-Reply-To: <4E062DFADC6E8142AA8EE9D214BA0C50E400ED@NB-EX-MBX01.diasemi.com>

On 21/06/13 11:28, Thomas Weininger wrote:
> Thank you for your suggestion Arnout. I tried it out but the error stays the same:
>
> /home/diasemi/workspace/dialog/buildroot/output/host/usr/bin/ccache /usr/bin/gcc -pthread -shared -L/home/diasemi/workspace/dialog/buildroot/output/host/lib -L/home/diasemi/workspace/dialog/buildroot/output/host/usr/lib -Wl,-rpath,/home/diasemi/workspace/dialog/buildroot/output/host/usr/lib -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -mfpu=vfpv4-d16 -mfloat-abi=hard -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I../include build/temp.linux-i686-2.7/smbusmodule.o -L/home/diasemi/workspace/dialog/buildroot/output/host/usr/lib -lpython2.7 -o build/lib.linux-i686-2.7/smbus.so
> gcc: error: unrecognized command line option '-mfpu=vfpv4-d16'
> gcc: error: unrecognized command line option '-mfloat-abi=hard'
> error: command '/home/diasemi/workspace/dialog/buildroot/output/host/usr/bin/ccache' failed with exit status 1
>
> It still uses /usr/bin/gcc for building smbus.so and I am not sure if I understand why this happens. Could it be because it uses python distutils in order to start the build?
>
> The file structure in the py-smbus subdirectory of i2c-tools is:
> py-smbus/
> ??? Module.mk
> ??? README
> ??? setup.py
> ??? smbusmodule.c
>
>  From the Module.mk file:
> all-python: $(INCLUDE_DIR)/linux/i2c-dev.h
>          $(DISTUTILS) build

  Can you add 'echo $$PATH' just above the call to $(DISTUTILS), just to 
be sure that the right python will be used?  Or, in the setup.py script, add

import sys
print sys.path

to check that the host-distutils will be used.


>
> So it uses Python distutils (the setup.py) in order to build smbus.so. And it seems to me that it uses the host distutils instead of the target system's one.
> If this is the problem, then the Module.mk or the setup.py will most likely need to be patched in order to use the target system toolchain?

  Hang on, maybe you have to build host-python-setuptools first?

  Regards,
  Arnout

-- 
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-06-21  9:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20  7:18 [Buildroot] Build error when trying to build the py-smbus package of i2c-tools Thomas Weininger
2013-06-20  7:57 ` Thomas Petazzoni
2013-06-20  9:30   ` Thomas Weininger
2013-06-20 16:25 ` Arnout Vandecappelle
2013-06-21  9:28   ` Thomas Weininger
2013-06-21  9:49     ` Arnout Vandecappelle [this message]
2013-06-21 10:31       ` Thomas Weininger
2013-06-21 10:48         ` Arnout Vandecappelle
2013-06-21 12:06           ` Thomas Weininger
2013-06-21 12:37             ` Thomas Weininger
2013-06-21 12:48               ` Thomas Petazzoni

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=51C421AF.20904@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