Discussion:
[Numpy-discussion] building NumPy with gcc if Python was built with icc?!?
BERGER Christian
2016-02-16 19:39:55 UTC
Permalink
Hi All,

Here's a potentially dumb question: is it possible to build NumPy with gcc, if python was built with icc?
Right now, the build is failing in the toolchain check phase, because gcc doesn't know how to handle icc-specific c flags (like -fp-model, prec-sqrt, ...)
In our environment we're providing an embedded python that our customers should be able to use and extend with 3rd party modules (like numpy). Problem is that our sw is built using icc, but we don't want to force our customers to do the same and we also don't want to build every possible 3rd party module for our customers.

Thanks for your help,
Christian


This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email and all attachments,

(iii) Dassault Systemes does not accept or assume any liability or responsibility for any use of or reliance on this email.

For other languages, go to http://www.3ds.com/terms/email-disclaimer
G Young
2016-02-16 19:44:54 UTC
Permalink
I'm not sure about anyone else, but having been playing around with both
gcc and icc, I'm afraid you might be out of luck. Is there any reason why
you can't use a Python distribution built with gcc?
Post by BERGER Christian
Hi All,
Here's a potentially dumb question: is it possible to build NumPy with
gcc, if python was built with icc?
Right now, the build is failing in the toolchain check phase, because gcc
doesn't know how to handle icc-specific c flags (like -fp-model, prec-sqrt,
...)
In our environment we're providing an embedded python that our customers
should be able to use and extend with 3rd party modules (like numpy).
Problem is that our sw is built using icc, but we don't want to force our
customers to do the same and we also don't want to build every possible 3rd
party module for our customers.
Thanks for your help,
Christian
This email and any attachments are intended solely for the use of the
individual or entity to whom it is addressed and may be confidential and/or
privileged.
If you are not one of the named recipients or have received this email in error,
(i) you should not read, disclose, or copy it,
(ii) please notify sender of your receipt by reply email and delete this
email and all attachments,
(iii) Dassault Systemes does not accept or assume any liability or
responsibility for any use of or reliance on this email.
For other languages, go to http://www.3ds.com/terms/email-disclaimer
_______________________________________________
NumPy-Discussion mailing list
https://mail.scipy.org/mailman/listinfo/numpy-discussion
Nathaniel Smith
2016-02-16 20:02:33 UTC
Permalink
In principle this should work (offer may be void on windows which has its
own special weirdnesses, but I assume you're not on windows). icc and gcc
should both support the same calling conventions and so forth. It sounds
like you're just running into an annoying build system configuration issue
where python likes to remember the compiler options used to build python,
and then when it's time to build extension modules then the extension
modules ask distutils what to do and distutils tells them to use these
remembered options to build themselves as well. So you want to look into
what compiler flag defaults are being exported by your python build, and
figure out some way to make it export the ones you want instead of the
defaults. I don't think there's anything really numpy specific about this,
since it's about cpython's own build system plus stdlib -- I'd try asking
on python-list or so.

-n
Post by BERGER Christian
Hi All,
Here's a potentially dumb question: is it possible to build NumPy with
gcc, if python was built with icc?
Right now, the build is failing in the toolchain check phase, because gcc
doesn't know how to handle icc-specific c flags (like -fp-model, prec-sqrt,
...)
In our environment we're providing an embedded python that our customers
should be able to use and extend with 3rd party modules (like numpy).
Problem is that our sw is built using icc, but we don't want to force our
customers to do the same and we also don't want to build every possible 3rd
party module for our customers.
Thanks for your help,
Christian
This email and any attachments are intended solely for the use of the
individual or entity to whom it is addressed and may be confidential and/or
privileged.
If you are not one of the named recipients or have received this email in error,
(i) you should not read, disclose, or copy it,
(ii) please notify sender of your receipt by reply email and delete this
email and all attachments,
(iii) Dassault Systemes does not accept or assume any liability or
responsibility for any use of or reliance on this email.
For other languages, go to http://www.3ds.com/terms/email-disclaimer
_______________________________________________
NumPy-Discussion mailing list
https://mail.scipy.org/mailman/listinfo/numpy-discussion
David Cournapeau
2016-02-17 11:20:15 UTC
Permalink
Post by BERGER Christian
Hi All,
Here's a potentially dumb question: is it possible to build NumPy with
gcc, if python was built with icc?
Right now, the build is failing in the toolchain check phase, because gcc
doesn't know how to handle icc-specific c flags (like -fp-model, prec-sqrt,
...)
In our environment we're providing an embedded python that our customers
should be able to use and extend with 3rd party modules (like numpy).
Problem is that our sw is built using icc, but we don't want to force our
customers to do the same and we also don't want to build every possible 3rd
party module for our customers.
If you are the one providing python, your best bet is to post process your
python to strip the info from Intel-specific options. The process is
convoluted, but basically:

- at configure time, python makes a difference between CFLAGS and OPTS, and
will store both in your Makefile
- when python is installed, it will parse the Makefile and generate some
dict written in the python stdlib as _sysconfigdata.py

_sysconfigdata.py is what's used by distutils to build C extensions.

This is only valid on Unix/cygwin, if you are on windows, the process is
completely different.

David
Post by BERGER Christian
Thanks for your help,
Christian
This email and any attachments are intended solely for the use of the
individual or entity to whom it is addressed and may be confidential and/or
privileged.
If you are not one of the named recipients or have received this email in error,
(i) you should not read, disclose, or copy it,
(ii) please notify sender of your receipt by reply email and delete this
email and all attachments,
(iii) Dassault Systemes does not accept or assume any liability or
responsibility for any use of or reliance on this email.
For other languages, go to http://www.3ds.com/terms/email-disclaimer
_______________________________________________
NumPy-Discussion mailing list
https://mail.scipy.org/mailman/listinfo/numpy-discussion
Loading...