Disable ENABLE_PADLOCK_SUPPORT?

2 views
Skip to first unread message

Rob Goedman

unread,
Apr 21, 2008, 12:31:37 PM4/21/08
to sage-...@googlegroups.com
Hi,

Brand new to Sage builds!

On Mac OS 10.5.2, with:

Robs-Intel:sage-3.0.rc0 rob$ gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5531~1/src/configure --disable-
checking -enable-werror --prefix=/usr --mandir=/usr/share/man --enable-
languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/
$/-4.2/ --with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/
usr/lib --build=i686-apple-darwin9 --host=i686-apple-darwin9 --
target=i686-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5531)

make gives below (summarized) error on 2.11, alpha6, rc0 and rc1.
Below attachment contains the complete rc1 install.log .

If, as a quick test, the Mac specific '-fasm-blocks' flag is added in
the subdir cipher, make complains about the assembler code in the asm
block in poll_padlock.

Do I have to disable ENABLE_PADLOCK_SUPPORT? If so, can I force the
sage make to use './configure -disable_padlock_support'?

As this is not related to the upcoming Sage 3.0 release, I'm fine to
wait for a binary release, although ultimately I would like to be able
to build sage myself.

Thanks,
Rob

----------------------------------------------

Making all in cipher
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -
I.. -I../src -I../src -I/Users/rob/Downloads/sage-3.0.rc0/local/
include -I/Users/rob/Downloads/sage-3.0.rc0/local/include -g -O2 -Wall
-Wpointer-arith -MT cipher.lo -MD -MP -MF .deps/cipher.Tpo -c -o
cipher.lo cipher.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT cipher.lo -
MD -MP -MF .deps/cipher.Tpo -c cipher.c -fno-common -DPIC -o .libs/
cipher.o
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT cipher.lo -
MD -MP -MF .deps/cipher.Tpo -c cipher.c -o cipher.o >/dev/null 2>&1
mv -f .deps/cipher.Tpo .deps/cipher.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -
I.. -I../src -I../src -I/Users/rob/Downloads/sage-3.0.rc0/local/
include -I/Users/rob/Downloads/sage-3.0.rc0/local/include -g -O2 -Wall
-Wpointer-arith -MT pubkey.lo -MD -MP -MF .deps/pubkey.Tpo -c -o
pubkey.lo pubkey.c
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT pubkey.lo -
MD -MP -MF .deps/pubkey.Tpo -c pubkey.c -fno-common -DPIC -o .libs/
pubkey.o

...

gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT random.lo -
MD -MP -MF .deps/random.Tpo -c random.c -fno-common -DPIC -o .libs/
random.o
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT random.lo -
MD -MP -MF .deps/random.Tpo -c random.c -o random.o >/dev/null 2>&1
mv -f .deps/random.Tpo .deps/random.Plo
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -
I.. -I../src -I../src -I/Users/rob/Downloads/sage-3.0.rc0/local/
include -I/Users/rob/Downloads/sage-3.0.rc0/local/include -g -O2 -Wall
-Wpointer-arith -MT rndhw.lo -MD -MP -MF .deps/rndhw.Tpo -c -o
rndhw.lo rndhw.c
gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT rndhw.lo -
MD -MP -MF .deps/rndhw.Tpo -c rndhw.c -fno-common -DPIC -o .libs/
rndhw.o
rndhw.c: In function ‘poll_padlock’:
rndhw.c:60: error: asm blocks not enabled, use `-fasm-blocks'
rndhw.c:60: error: expected identifier before ‘(’ token
rndhw.c:60: confused by earlier errors, bailing out
make[4]: *** [rndhw.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
failed to build libgcrypt

real 0m34.193s
user 0m17.394s
sys 0m14.601s
sage: An error occurred while installing libgcrypt-1.4.0.p1
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /Users/rob/Downloads/sage-3.0.rc0/install.log. Describe your
computer, operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/Users/rob/Downloads/sage-3.0.rc0/spkg/build/libgcrypt-1.4.0.p1 and
type 'make'.
Instead type "/Users/rob/Downloads/sage-3.0.rc0/sage -sh"
in order to set all environment variables correctly, then cd to
/Users/rob/Downloads/sage-3.0.rc0/spkg/build/libgcrypt-1.4.0.p1
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/libgcrypt-1.4.0.p1] Error 1

real 15m9.941s
user 11m47.843s
sys 2m35.299s

---------------------------------------------------------------


install.log

William Stein

unread,
Apr 21, 2008, 12:54:23 PM4/21/08
to sage-...@googlegroups.com
On Mon, Apr 21, 2008 at 9:31 AM, Rob Goedman <goe...@mac.com> wrote:
> Hi,
>
> Brand new to Sage builds!
>
> On Mac OS 10.5.2, with:
>
> Robs-Intel:sage-3.0.rc0 rob$ gcc -v
> Using built-in specs.
> Target: i686-apple-darwin9
> Configured with: /var/tmp/gcc_42/gcc_42-5531~1/src/configure --disable-
> checking -enable-werror --prefix=/usr --mandir=/usr/share/man --enable-
> languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/
> $/-4.2/ --with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/
> usr/lib --build=i686-apple-darwin9 --host=i686-apple-darwin9 --
> target=i686-apple-darwin9
> Thread model: posix
> gcc version 4.2.1 (Apple Inc. build 5531)
^^^^^^^^^^^^^^^^^^^

Which version of XCode is this? When did you get it?
I'm sure your problem is that we haven't ported Sage to work
with Apple's heavily hacked GCC-4.2.1.

I've been building all my OS X code on all platforms using
Apples GCC-4.0.1. I wasn't aware that they released GCC-4.2.1.
My guess is that numerous things will have to be fixed to get
Sage to build against APPLE-GCC-4.2.1. Your best bet
is to install a binary or install an older XCode (with GCC-4.0.1)
or wait until Sage supports GCC-4.2.1, which means 1-2 weeks
(since obviously I'll upgrade and have to support the newer compiler).

The compiler I use:
bsd:~ was$ gcc -v


Using built-in specs.
Target: i686-apple-darwin9

Configured with: /var/tmp/gcc/gcc-5465~16/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
bsd:~ was$


-- William

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

mabshoff

unread,
Apr 21, 2008, 1:53:43 PM4/21/08
to sage-devel


On Apr 21, 6:54 pm, "William Stein" <wst...@gmail.com> wrote:
> On Mon, Apr 21, 2008 at 9:31 AM, Rob Goedman <goed...@mac.com> wrote:
> > Hi,
>
> >  Brand new to Sage builds!
>
> >  On Mac OS 10.5.2, with:
>
> >  Robs-Intel:sage-3.0.rc0 rob$ gcc -v
> >  Using built-in specs.
> >  Target: i686-apple-darwin9
> >  Configured with: /var/tmp/gcc_42/gcc_42-5531~1/src/configure --disable-
> >  checking -enable-werror --prefix=/usr --mandir=/usr/share/man --enable-
> >  languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/
> >  $/-4.2/ --with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/
> >  usr/lib --build=i686-apple-darwin9 --host=i686-apple-darwin9 --
> >  target=i686-apple-darwin9
> >  Thread model: posix
> >  gcc version 4.2.1 (Apple Inc. build 5531)
>
> ^^^^^^^^^^^^^^^^^^^
>
> Which version of XCode is this?  When did you get it?
> I'm sure your problem is that we haven't ported Sage to work
> with Apple's heavily hacked GCC-4.2.1.

Nah, this is libgcrypt acting stupid, i.e. padlock is only available
on VIA CPUs IIRC. So unless somebody did something they are no
supposed to it is something we can configure around.

> I've been building all my OS X code on all platforms using
> Apples GCC-4.0.1.   I wasn't aware that they released GCC-4.2.1.
> My guess is that numerous things will have to be fixed to get
> Sage to build against APPLE-GCC-4.2.1.  Your best bet
> is to install a binary or install an older XCode (with GCC-4.0.1)
> or wait until Sage supports GCC-4.2.1, which means 1-2 weeks
> (since obviously I'll upgrade and have to support the newer compiler).

Yeah, let's get the new XCode up and running and solve those problems
in Sage 3.0.1.

Cheers,

Michael

Rob Goedman

unread,
Apr 21, 2008, 2:54:44 PM4/21/08
to sage-...@googlegroups.com
This is XCode 3.0 with the updated gcc suite from the Apple developer
site. It sure seems to compile an awful lot before hitting this.

I wonder how to make this work with R. R has these 100s of packages,
many of which need to be compiled when installed.

Right now, at least on the Mac, R-2-7 itself supports/contains 4
architectures ( ppc, x86 each 32 and 64 bits ) and the compilers for
c, c++ and fortran need to match for above package installations
(those that need to be compiled). Until recently there were disastrous
bugs in the compilers for 64 bits (and other issues with gcc4.0, e.g.
when fortran was involved).

Sage rc1 seems to include R-2.6.1, this week's R-2.7 release will
replace R-2.6.2.

I have tried gcc-4.0.1 but on my system it will hang forever (might be
related to the broken X11 that ships with Leopard):

gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/
Users/rob/Downloads/sage-3.0.rc1/spkg/build/python-2.5.2/src/Mac/
Modules/launch/_Launchmodule.o -L/Users/rob/Downloads/sage-3.0.rc1/
local/lib -L/usr/local/lib -o build/lib.macosx-10.3-i386-2.5/
_Launch.so -framework ApplicationServices
*** WARNING: renaming "_Launch" since importing it failed:
dlopen(build/lib.macosx-10.3-i386-2.5/_Launch.so, 2): Symbol not
found: __cg_png_create_info_struct
Referenced from: /System/Library/Frameworks/
ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/
Versions/A/ImageIO
Expected in: /usr/X11R6/lib/libPng.dylib

building '_CG' extension
creating build/temp.macosx-10.3-i386-2.5/Users/rob/Downloads/
sage-3.0.rc1/spkg/build/python-2.5.2/src/Mac/Modules/cg
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-
madd -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/Users/
rob/Downloads/sage-3.0.rc1/spkg/build/python-2.5.2/src/./Include -I/
Users/rob/Downloads/sage-3.0.rc1/spkg/build/python-2.5.2/src/./Mac/
Include -I/Users/rob/Downloads/sage-3.0.rc1/local/include -I. -
IInclude -I./Include -I/usr/local/include -I/Users/rob/Downloads/
sage-3.0.rc1/spkg/build/python-2.5.2/src/Include -I/Users/rob/
Downloads/sage-3.0.rc1/spkg/build/python-2.5.2/src -c /Users/rob/
Downloads/sage-3.0.rc1/spkg/build/python-2.5.2/src/Mac/Modules/cg/
_CGmodule.c -o build/temp.macosx-10.3-i386-2.5/Users/rob/Downloads/
sage-3.0.rc1/spkg/build/python-2.5.2/src/Mac/Modules/cg/_CGmodule.o -
Wno-deprecated-declarations
gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/
Users/rob/Downloads/sage-3.0.rc1/spkg/build/python-2.5.2/src/Mac/
Modules/cg/_CGmodule.o -L/Users/rob/Downloads/sage-3.0.rc1/local/lib -
L/usr/local/lib -o build/lib.macosx-10.3-i386-2.5/_CG.so -framework
ApplicationServices

and it will never finish this step.

My hope is that I can literally use either R.app to work with R and
its libraries and Sage notebooks using the same version of R and
libraries. Maybe the way Sage works with Mathematica?

As MIchael suggested, 3.0.1 stuff!

Rob

>> -Wpointer-arith -MT pubkey.lo -MD -MP -MF .deps/pubkey.Tpo -c -o
>> pubkey.lo pubkey.c
>> gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
>> Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
>> sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT
>> pubkey.lo -
>> MD -MP -MF .deps/pubkey.Tpo -c pubkey.c -fno-common -DPIC -o .libs/
>> pubkey.o
>>
>> ...
>>
>> gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
>> Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
>> sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT
>> random.lo -
>> MD -MP -MF .deps/random.Tpo -c random.c -fno-common -DPIC -o .libs/
>> random.o
>> gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/Users/rob/
>> Downloads/sage-3.0.rc0/local/include -I/Users/rob/Downloads/
>> sage-3.0.rc0/local/include -g -O2 -Wall -Wpointer-arith -MT
>> random.lo -
>> MD -MP -MF .deps/random.Tpo -c random.c -o random.o >/dev/null 2>&1
>> mv -f .deps/random.Tpo .deps/random.Plo
>> /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -

>> I. -
>> I.. -I../src -I../src -I/Users/rob/Downloads/sage-3.0.rc0/local/
>> include -I/Users/rob/Downloads/sage-3.0.rc0/local/include -g -O2 -
>> Wall

mabshoff

unread,
Apr 21, 2008, 5:53:56 PM4/21/08
to sage-devel
On Apr 21, 8:54 pm, Rob Goedman <goed...@mac.com> wrote:

Hi Rob,

> This is XCode 3.0 with the updated gcc suite from the Apple developer  
> site. It sure seems to compile an awful lot before hitting this.
>
> I wonder how to make this work with R. R has these 100s of packages,  
> many of which need to be compiled when installed.
>
> Right now, at least on the Mac, R-2-7 itself supports/contains 4  
> architectures ( ppc, x86 each 32 and 64 bits ) and the compilers for
> c, c++ and fortran need to match for above package installations  
> (those that need to be compiled). Until recently there were disastrous
> bugs in the compilers for 64 bits (and other issues with gcc4.0, e.g.  
> when fortran was involved).
>
> Sage rc1 seems to include R-2.6.1, this week's R-2.7 release will  
> replace R-2.6.2.

We plan to upgrade to R 2.7 once it is out and we do some testing.
The issue seems to be with libPng. We plan to teach R to use the
version we are compiling ourselves in Sage since Apple's libPng leaves
much to be desired, i.e. a header file for example ;)

> and it will never finish this step.
>
> My hope is that I can literally use either R.app to work with R and  
> its libraries and Sage notebooks using the same version of R and  
> libraries. Maybe the way Sage works with Mathematica?
>
> As MIchael suggested, 3.0.1 stuff!

I will hopefully have time to install the new & updated toolchain
soon. The pad lock issue OSX should be fixed in the spkg at

http://sage.math.washington.edu/home/mabshoff/SPKG/libgcrypt-1.4.0.p2.spkg

This is now tracked at http://trac.sagemath.org/sage_trac/ticket/2993
> Rob

Rob: if you could verify that it fixes the issue it will be in 3.0.1.
We disabled padlock support on non-OSX. It seems that some version of
gcc 4.2 are slightly stupid and make configure believe that padlock
support is available on non-Via CPUs. Go figure.

Cheers,

Michael

William Stein

unread,
Apr 21, 2008, 8:05:26 PM4/21/08
to sage-...@googlegroups.com
On Mon, Apr 21, 2008 at 11:54 AM, Rob Goedman <goe...@mac.com> wrote:
>
> This is XCode 3.0 with the updated gcc suite from the Apple developer
> site. It sure seems to compile an awful lot before hitting this.

How does one get the "updated gcc suite from the Apple Developer site"?
I just found http://developer.apple.com/tools/download/
I absolutely can't find gcc-4.2.1 anywhere on the apple website,
and it's definitely not included in XCode 3.0 as far as I can tell.

Thanks.

>
> I wonder how to make this work with R. R has these 100s of packages,
> many of which need to be compiled when installed.
>
> Right now, at least on the Mac, R-2-7 itself supports/contains 4
> architectures ( ppc, x86 each 32 and 64 bits ) and the compilers for
> c, c++ and fortran need to match for above package installations
> (those that need to be compiled). Until recently there were disastrous
> bugs in the compilers for 64 bits (and other issues with gcc4.0, e.g.
> when fortran was involved).
>
> Sage rc1 seems to include R-2.6.1, this week's R-2.7 release will
> replace R-2.6.2.
>
> I have tried gcc-4.0.1 but on my system it will hang forever (might be
> related to the broken X11 that ships with Leopard):

I've built Sage with gcc-4.0.1 many times on many flavors of OS X...

Yes, that is certainly going to be possible with Sage-3.0. It is one
of the main new features.

Rob Goedman

unread,
Apr 21, 2008, 9:59:44 PM4/21/08
to sage-...@googlegroups.com
It was released Aug last year? 

It's GCC 4.2 Developer Preview 1 (from the Developer Connection | Member Site - http://connect.apple.com/ ).

It adds gcc-4.2 to gcc-4.0 included in Xcode.

Rob

Rob Goedman

unread,
Apr 22, 2008, 2:38:16 PM4/22/08
to sage-...@googlegroups.com
Michael,

Thanks a lot. The new libgcrypt-1.4.0.p2.spkg indeed does fix the problem, at least during the make! 

As William predicted, gcc-4.2.1 does encounter other issues, e.g. in gnutls (see attached install log,
not recognized compile flags).

The 3.0 release on my system fails on libPng when I try to send input to R. Maybe
this is also related to an X11 fix applied ( http://r.research.att.com/building.html )? Notebook
output for 'v <- rnorm(10, 0, 3);v' attached below.

Thanks,
Rob


install.log
Reply all
Reply to author
Forward
0 new messages