Build failing on Solaris

K

Karl Hanzel

I've tried to google-up an answer but am not finding it, even tho i have
seen passing reference to what sounds like the same problem from others.

On a Solaris-8 machine i'm trying to build Python-2.3.2. Using gcc-3.2.
All seems to go pretty well for a while, but them i'm getting the
following:

--------------------
$ make
....
case $MAKEFLAGS in \
*-s*) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \
*) CC='gcc' LDSHARED='gcc -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \
esac
running build
running build_ext
Segmentation Fault - core dumped
gmake: *** [sharedmods] Error 139
--------------------

I've confirmed the seg fault is coming from

./python -E .setup.py build

'Utterly unsure how to proceed. Thanks for any/all help.


*----->

Karl Hanzel
UCAR/COMET Systems Administrator
Boulder, Colorado
(303)497-8479
(e-mail address removed)
 
A

Andrew Koenig

On a Solaris-8 machine i'm trying to build Python-2.3.2. Using gcc-3.2.
All seems to go pretty well for a while, but them i'm getting the
following:

--------------------
$ make
...
case $MAKEFLAGS in \
*-s*) CC='gcc' LDSHARED='gcc -shared'
OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q
build;; \
*) CC='gcc' LDSHARED='gcc -shared'
OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py
build;; \
esac
running build
running build_ext
Segmentation Fault - core dumped
gmake: *** [sharedmods] Error 139

Certain versions of binutils do not correctly support dynamic linking on
Solaris, which gives rise to symptoms similar to the ones you are seeing. I
am pretty sure that binutils 2.13.2.1 works. To find out whether the
version on your machine works, you can execute the following shell script:

#! /bin/sh
mkdir /tmp/t.$$ || exit 3
cd /tmp/t.$$ || exit 3
cat >main.c <<'EOF'
#include <stdio.h>
#include <dlfcn.h>
int main(void)
{
void *handle, *sym;
char *error;
puts("calling dlopen");
handle = dlopen("./dyn.so", RTLD_NOW);
if (!handle) {
printf("%s\n", dlerror());
return 1;
}
puts("calling dlsym");
sym = dlsym(handle, "sym");
if ((error = dlerror()) != 0) {
printf("%s\n", error);
return 1;
}
puts("calling sym");
((void (*)(void))sym)();
puts("done");
return 0;
}
EOF
cat >dyn.c <<'EOF'
#include <stdio.h>
void sym(void)
{
puts("in sym");
}
EOF
[ -n "$SHFLAGS" ] || SHFLAGS="-fPIC -shared"
[ -n "$CC" ] || CC=gcc
set -x
$CC $CFLAGS $SHFLAGS dyn.c -o dyn.so
$CC $CFLAGS main.c -o main -ldl
../main || exit $?
cd /tmp
rm -rf t.$$
 
K

Karl Hanzel

...
Certain versions of binutils do not correctly support dynamic linking on
Solaris, which gives rise to symptoms similar to the ones you are
seeing. I am pretty sure that binutils 2.13.2.1 works. To find out
whether the version on your machine works, you can execute the following
shell script...

Thanks, Andrew. As you suspected, your script generates the seg fault &
returns the same errant "139" observed during the build of Python. I'll
install an updated 'binutils' package and try again.

Karl
*----->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top