#1186 Program linked with Guile segfaults

Known_Feature
closed-invalid
nobody
faq (6)
2008-08-01
2008-07-01
No

Hi,

I tried to link the following program with guile:

----8<------------------------------------------
#include <stdio.h>
#include <libguile.h>

static void *
guile_main (void *data)
{
void *ret = NULL;

printf ("body\n");
fflush (stdout);

return ret;
}

int
main (int argc, char *argv[])
{
void *guile_ret = NULL;
int ret = 0;

printf ("begin\n");
fflush (stdout);

guile_ret = scm_with_guile (guile_main, NULL);

printf ("end\n");
fflush (stdout);

return ret;
}
----8<------------------------------------------

and it segfaults. Gdb reports a problem in strsep, in msys-1.0.dll, as usual with this kind of error, I suspect the problem isn't in strsep itself, but in the way it is called (bad args, probably).

I even tried to compile & link libguile/guile.c (from guile-1.8.4.tar.gz upstream package) and it segfaults the same way. Interestingly enough, the binary shipped in guile-1.8.4-MSYS-1.0.11-1-bin.tar.gz does *not* have this problem. To link my C programs, I used `guile-config compile`" -DSCM_IMPORT" to compile (CFLAGS) and `guile-config link` to link (LDFLAGS).

Here are the packages I have installed, running under Windows XP:

autoconf2.5-2.61-1-bin.tar.bz2
autoconf-4-1-bin.tar.bz2
autogen-5.9.2-MSYS-1.0.11-1-bin.tar.gz
autogen-5.9.2-MSYS-1.0.11-1-dev.tar.gz
autogen-5.9.2-MSYS-1.0.11-1-dll25.tar.gz
automake1.10-1.10-1-bin.tar.bz2
automake-3-1-bin.tar.bz2
bash-3.1-MSYS-1.0.11-1.tar.bz2
binutils-2.18.50-20080109-2.tar.gz
bison-2.3-MSYS-1.0.11-1.tar.bz2
coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
crypt-1.1-1-MSYS-1.0.11-1.tar.bz2
csmake-3.81-MSYS-1.0.11-2.tar.bz2
cvs-1.11.22-MSYS-1.0.11-1-bin.tar.gz
diffutils-2.8.7-MSYS-1.0.11-1.tar.bz2
findutils-4.3-MSYS-1.0.11-1.tar.bz2
flex-2.5.33-MSYS-1.0.11-1.tar.bz2
gawk-3.1.5-MSYS-1.0.11-1.tar.bz2
gcc-ada-3.4.5-20060117-3.tar.gz
gcc-core-3.4.5-20060117-3.tar.gz
gcc-g++-3.4.5-20060117-3.tar.gz
gcc-g77-3.4.5-20060117-3.tar.gz
gcc-java-3.4.5-20060117-3.tar.gz
gcc-objc-3.4.5-20060117-3.tar.gz
gdb-6.8-mingw-3.tar.bz2
gdbm-1.8.3-MSYS-1.0.11-1.tar.bz2
gettext-0.16.1-1-bin.tar.bz2
gettext-0.16.1-1-dll.tar.bz2
gettext-0.16.1-MSYS-1.0.11-1.tar.bz2
gettext-devel-0.16.1-MSYS-1.0.11-1.tar.bz2
gmp-4.2.2-MSYS-1.0.11-1-dev.tar.gz
gmp-4.2.2-MSYS-1.0.11-1-dll3.tar.gz
guile-1.8.4-MSYS-1.0.11-1-bin.tar.gz
guile-1.8.4-MSYS-1.0.11-1-dev.tar.gz
guile-1.8.4-MSYS-1.0.11-1-dll17.tar.gz
guile-1.8.4-MSYS-1.0.11-1-doc.tar.gz
inetutils-1.3.2-40-MSYS-1.0.11-2-bin.tar.gz
libiconv-1.11-1-bin.tar.bz2
libiconv-1.11-1-dll.tar.bz2
libiconv-1.11-MSYS-1.0.11-1.tar.bz2
libtool1.5-1.5.25a-1-bin.tar.bz2
libtool1.5-1.5.25a-1-dll.tar.bz2
libtool1.5-1.5.25a-20070701-MSYS-1.0.11-1.tar.bz2
lndir-6.8.1.0-MSYS-1.0.11-1.tar.bz2
lpr-1.0.1-MSYS.tar.gz
lzma-4.43-MSYS-1.0.11-1-bin.tar.gz
make-3.81-MSYS-1.0.11-2.tar.bz2
mingw-runtime-3.14.tar.gz
mingw-utils-0.3.tar.gz
minires-1.01-1-MSYS-1.0.11-1.tar.bz2
MSYS-1.0.11-20071204.tar.bz2
msysCORE-1.0.11-2007.01.19-1.tar.bz2
openssh-4.7p1-MSYS-1.0.11-1-bin.tar.gz
openssl-0.9.8g-1-MSYS-1.0.11-2-bin.tar.gz
openssl-0.9.8g-1-MSYS-1.0.11-2-dev.tar.gz
openssl-0.9.8g-1-MSYS-1.0.11-2-dll098.tar.gz
perl-5.6.1-MSYS-1.0.11-1.tar.bz2
perl-man-5.6.1-MSYS-1.0.11-1.tar.bz2
regex-0.12-MSYS-1.0.11-1.tar.bz2
tar-1.19.90-MSYS-1.0.11-1-bin.tar.gz
texinfo-4.11-MSYS-1.0.11-1.tar.bz2
vim-7.1-MSYS-1.0.11-1-bin.tar.gz
w32api-3.11.tar.gz
zlib-1.2.3-MSYS-1.0.11-1.tar.bz2

Any clue?

Christian.

Discussion

  • Earnie Boyd

    Earnie Boyd - 2008-07-01
    • labels: --> faq
    • milestone: --> Known_Feature
    • status: open --> pending-invalid
     
  • Earnie Boyd

    Earnie Boyd - 2008-07-01

    Logged In: YES
    user_id=15438
    Originator: NO

    That guile library requires the MSYS runtime which means you would need a MSYS build environment. See the wiki for the HOWTO on that. However, I don't think you really want that. I think you want to build guile as a library using the MSVCRT runtime.

     
  • SourceForge Robot

    • status: pending-invalid --> closed-invalid
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks