On Tue, Sep 13, 2011 at 08:46:05AM -0700, Michael Rubinstein wrote: > > I tried adding PySys_SetArgv(argc, argv); after Py_Initialize(); > It gets me further but then gives a strange error message: > > Loading the Sage library... > > > ------------------------------------------------------------ > Unhandled SIGSEGV: A segmentation fault occurred in Sage. > This probably occurred because a *compiled* component > of Sage has a bug in it (typically accessing invalid memory) > or is not properly wrapped with _sig_on, _sig_off. > You might want to run Sage under gdb with 'sage -gdb' to debug this. > Sage will now terminate (sorry). > ------------------------------------------------------------
I've just tried it here with your embed.c + PySys_SetArgv(argc, argv), and it works for me when I link against libpython2.6 dynamically: $ gcc -I$SAGE_LOCAL/include/python2.6 embed.c -lpython2.6 -lm -lutil -lpthread -ldl -o embed $ ./embed 1+1: 2 Load sage Factor 2310: 2 * 3 * 5 * 7 * 11 $ This is 64 bit linux with sage 4.7.1rc1. -Willem Jan -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org