unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [Neil Jerram] Re: undefined reference to `scm_init_guile'
@ 2006-03-09 22:35 Neil Jerram
  2006-03-10  6:41 ` steven mestdagh
  0 siblings, 1 reply; 13+ messages in thread
From: Neil Jerram @ 2006-03-09 22:35 UTC (permalink / raw)
  Cc: steven mestdagh

[-- Attachment #1: Type: text/plain, Size: 111 bytes --]

Copying to the Guile list ...  (Steven, please CC guile-devel@gnu.org
on your future emails about this also.)


[-- Attachment #2: Type: message/rfc822, Size: 1435 bytes --]

From: Neil Jerram <neil@ossau.uklinux.net>
To: steven mestdagh <steven.mestdagh@esat.kuleuven.be>
Subject: Re: undefined reference to `scm_init_guile'
Date: Thu, 09 Mar 2006 22:32:44 +0000
Message-ID: <87y7zjtfjn.fsf@ossau.uklinux.net>

steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:

> Neil Jerram [2006-03-08, 08:50:56]:
>
>> We should fix test-num-integral so that it still builds in that case,
>> of course.  Do you also need scm_init_guile for your own programs?
>
> no, I was just trying to upgrade the OpenBSD port for guile to version
> 1.8.0, and it would be cool if the tests work.

Thanks.  What is the Guile version of the existing OpenBSD port?

(It's easy enough to fix the tests to use scm_with_guile instead, but
I'm concerned that we've unintentionally removed scm_init_guile, as
far as OpenBSD is concerned, without passing through any deprecation
phase; so it would probably be better to make scm_init_guile continue
to work.)

Regards,
        Neil

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-09 22:35 [Neil Jerram] Re: undefined reference to `scm_init_guile' Neil Jerram
@ 2006-03-10  6:41 ` steven mestdagh
  2006-03-10 22:10   ` Neil Jerram
  0 siblings, 1 reply; 13+ messages in thread
From: steven mestdagh @ 2006-03-10  6:41 UTC (permalink / raw)
  Cc: Guile Development

Neil Jerram [2006-03-09, 22:35:34]:
> >> We should fix test-num-integral so that it still builds in that case,
> >> of course.  Do you also need scm_init_guile for your own programs?
> >
> > no, I was just trying to upgrade the OpenBSD port for guile to version
> > 1.8.0, and it would be cool if the tests work.
> 
> Thanks.  What is the Guile version of the existing OpenBSD port?

it's 1.6.7.

> (It's easy enough to fix the tests to use scm_with_guile instead, but
> I'm concerned that we've unintentionally removed scm_init_guile, as
> far as OpenBSD is concerned, without passing through any deprecation
> phase; so it would probably be better to make scm_init_guile continue
> to work.)

i was planning to test build ports depending on guile, so anything that
uses scm_init_guile will error out. i'll let you know.

steven

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-10  6:41 ` steven mestdagh
@ 2006-03-10 22:10   ` Neil Jerram
  2006-03-10 22:23     ` steven mestdagh
  0 siblings, 1 reply; 13+ messages in thread
From: Neil Jerram @ 2006-03-10 22:10 UTC (permalink / raw)
  Cc: Guile Development

steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:

> Neil Jerram [2006-03-09, 22:35:34]:
>> 
>> Thanks.  What is the Guile version of the existing OpenBSD port?
>
> it's 1.6.7.

Thanks.

>> (It's easy enough to fix the tests to use scm_with_guile instead, but
>> I'm concerned that we've unintentionally removed scm_init_guile, as
>> far as OpenBSD is concerned, without passing through any deprecation
>> phase; so it would probably be better to make scm_init_guile continue
>> to work.)
>
> i was planning to test build ports depending on guile, so anything that
> uses scm_init_guile will error out. i'll let you know.

Digging a bit further, this looks like it's caused by
HAVE_PTHREAD_ATTR_GETSTACK not being defined.  Can you confirm that
when you run ./configure, it says that pthread_attr_getstack can't be
found?

Also, do you happen to know whether this function really is absent on
OpenBSD?  Perhaps ./configure just needs to try another
header/library?

       Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-10 22:10   ` Neil Jerram
@ 2006-03-10 22:23     ` steven mestdagh
  2006-03-10 22:41       ` Neil Jerram
  0 siblings, 1 reply; 13+ messages in thread
From: steven mestdagh @ 2006-03-10 22:23 UTC (permalink / raw)
  Cc: Guile Development

Neil Jerram [2006-03-10, 22:10:39]:
> steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:
> 
> > Neil Jerram [2006-03-09, 22:35:34]:
> >> 
> >> Thanks.  What is the Guile version of the existing OpenBSD port?
> >
> > it's 1.6.7.
> 
> Thanks.
> 
> >> (It's easy enough to fix the tests to use scm_with_guile instead, but
> >> I'm concerned that we've unintentionally removed scm_init_guile, as
> >> far as OpenBSD is concerned, without passing through any deprecation
> >> phase; so it would probably be better to make scm_init_guile continue
> >> to work.)
> >
> > i was planning to test build ports depending on guile, so anything that
> > uses scm_init_guile will error out. i'll let you know.
> 
> Digging a bit further, this looks like it's caused by
> HAVE_PTHREAD_ATTR_GETSTACK not being defined.  Can you confirm that
> when you run ./configure, it says that pthread_attr_getstack can't be
> found?

no, this function is found, and HAVE_PTHREAD_ATTR_GETSTACK is defined
in config.h.

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-10 22:23     ` steven mestdagh
@ 2006-03-10 22:41       ` Neil Jerram
  2006-03-10 23:01         ` steven mestdagh
  2006-03-25 20:11         ` Marius Vollmer
  0 siblings, 2 replies; 13+ messages in thread
From: Neil Jerram @ 2006-03-10 22:41 UTC (permalink / raw)
  Cc: Guile Development

steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:

> Neil Jerram [2006-03-10, 22:10:39]:
>> 
>> Digging a bit further, this looks like it's caused by
>> HAVE_PTHREAD_ATTR_GETSTACK not being defined.  Can you confirm that
>> when you run ./configure, it says that pthread_attr_getstack can't be
>> found?
>
> no, this function is found, and HAVE_PTHREAD_ATTR_GETSTACK is defined
> in config.h.

OK, so it's HAVE_LIBC_STACK_END that is not defined, then?  When this
is the case, 1.8 leaves scm_init_guile undefined, whereas 1.6 would
use the vast pile of magic in gc_os_dep.c.

Does that sound right?  If it is, I wonder why the change was made to
remove the gc_os_dep.c fallback option; I can't see anything obvious
in the ChangeLog.  (gc_os_dep.c and the necessary scm_get_stack_base()
definitions are still there in 1.8, they're just not used.)

   Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-10 22:41       ` Neil Jerram
@ 2006-03-10 23:01         ` steven mestdagh
  2006-03-11 18:43           ` Neil Jerram
  2006-03-25 20:11         ` Marius Vollmer
  1 sibling, 1 reply; 13+ messages in thread
From: steven mestdagh @ 2006-03-10 23:01 UTC (permalink / raw)
  Cc: Guile Development

Neil Jerram [2006-03-10, 22:41:16]:
> steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:
> 
> > Neil Jerram [2006-03-10, 22:10:39]:
> >> 
> >> Digging a bit further, this looks like it's caused by
> >> HAVE_PTHREAD_ATTR_GETSTACK not being defined.  Can you confirm that
> >> when you run ./configure, it says that pthread_attr_getstack can't be
> >> found?
> >
> > no, this function is found, and HAVE_PTHREAD_ATTR_GETSTACK is defined
> > in config.h.
> 
> OK, so it's HAVE_LIBC_STACK_END that is not defined, then?  When this
> is the case, 1.8 leaves scm_init_guile undefined, whereas 1.6 would
> use the vast pile of magic in gc_os_dep.c.

indeed this is a function we do not have.

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-10 23:01         ` steven mestdagh
@ 2006-03-11 18:43           ` Neil Jerram
  2006-03-11 19:02             ` steven mestdagh
  2006-03-25 20:16             ` Marius Vollmer
  0 siblings, 2 replies; 13+ messages in thread
From: Neil Jerram @ 2006-03-11 18:43 UTC (permalink / raw)
  Cc: Guile Development

steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:

> Neil Jerram [2006-03-10, 22:41:16]:
>> 
>> OK, so it's HAVE_LIBC_STACK_END that is not defined, then?  When this
>> is the case, 1.8 leaves scm_init_guile undefined, whereas 1.6 would
>> use the vast pile of magic in gc_os_dep.c.
>
> indeed this is a function we do not have.

Would you mind trying the program below on your system?  It may be
that on OpenBSD the pthread approach works for the main thread, and so
HAVE_LIBC_STACK_END isn't needed anyway.

(And interestingly, this program says that __libc_stack_end isn't
needed on my Debian GNU/Linux, despite the comment in threads.c
suggesting that it _is_ needed on Linux.)

Thanks,
        Neil


#include <pthread.h>

int main ()
{
  pthread_attr_t attr;
  void *start, *end;
  size_t size;

  pthread_getattr_np (pthread_self (), &attr);
  pthread_attr_getstack (&attr, &start, &size);
  end = (char *)start + size;

  printf("start = %p, &attr = %p, end = %p\n", start, &attr, end);

  if ((void *)&attr < start || (void *)&attr >= end)
    printf("__libc_stack_end is needed\n");
  else
    printf("__libc_stack_end is NOT needed\n");

  exit (0);
}

/* compile-command: cc -o pthrt pthrt.c -lpthread */



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-11 18:43           ` Neil Jerram
@ 2006-03-11 19:02             ` steven mestdagh
  2006-03-11 20:45               ` Neil Jerram
  2006-03-25 20:16             ` Marius Vollmer
  1 sibling, 1 reply; 13+ messages in thread
From: steven mestdagh @ 2006-03-11 19:02 UTC (permalink / raw)
  Cc: Guile Development

Neil Jerram [2006-03-11, 18:43:17]:
> steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:
> 
> > Neil Jerram [2006-03-10, 22:41:16]:
> >> 
> >> OK, so it's HAVE_LIBC_STACK_END that is not defined, then?  When this
> >> is the case, 1.8 leaves scm_init_guile undefined, whereas 1.6 would
> >> use the vast pile of magic in gc_os_dep.c.
> >
> > indeed this is a function we do not have.
> 
> Would you mind trying the program below on your system?  It may be
> that on OpenBSD the pthread approach works for the main thread, and so
> HAVE_LIBC_STACK_END isn't needed anyway.

$ cc -pthread -o pthrt pthrt.c -lpthread 
/tmp//ccd14895.o(.text+0x2c): In function `main':
: undefined reference to `pthread_getattr_np'

I don't really know much about threaded stuff, but you might want to
check the man pages for OpenBSD's pthreads library:
http://www.openbsd.org/cgi-bin/man.cgi?query=pthreads

> 
> (And interestingly, this program says that __libc_stack_end isn't
> needed on my Debian GNU/Linux, despite the comment in threads.c
> suggesting that it _is_ needed on Linux.)
> 
> Thanks,
>         Neil
> 
> 
> #include <pthread.h>
> 
> int main ()
> {
>   pthread_attr_t attr;
>   void *start, *end;
>   size_t size;
> 
>   pthread_getattr_np (pthread_self (), &attr);
>   pthread_attr_getstack (&attr, &start, &size);
>   end = (char *)start + size;
> 
>   printf("start = %p, &attr = %p, end = %p\n", start, &attr, end);
> 
>   if ((void *)&attr < start || (void *)&attr >= end)
>     printf("__libc_stack_end is needed\n");
>   else
>     printf("__libc_stack_end is NOT needed\n");
> 
>   exit (0);
> }
> 
> /* compile-command: cc -o pthrt pthrt.c -lpthread */

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-11 19:02             ` steven mestdagh
@ 2006-03-11 20:45               ` Neil Jerram
  0 siblings, 0 replies; 13+ messages in thread
From: Neil Jerram @ 2006-03-11 20:45 UTC (permalink / raw)
  Cc: Guile Development

steven mestdagh <steven.mestdagh@esat.kuleuven.be> writes:

> Neil Jerram [2006-03-11, 18:43:17]:
>> 
>> Would you mind trying the program below on your system?  It may be
>> that on OpenBSD the pthread approach works for the main thread, and so
>> HAVE_LIBC_STACK_END isn't needed anyway.
>
> $ cc -pthread -o pthrt pthrt.c -lpthread 
> /tmp//ccd14895.o(.text+0x2c): In function `main':
> : undefined reference to `pthread_getattr_np'
>
> I don't really know much about threaded stuff, but you might want to
> check the man pages for OpenBSD's pthreads library:
> http://www.openbsd.org/cgi-bin/man.cgi?query=pthreads

Thanks.  It looks like it should just be "-pthread" in the compile
command instead of "-lpthread"; sorry about that.

        Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-10 22:41       ` Neil Jerram
  2006-03-10 23:01         ` steven mestdagh
@ 2006-03-25 20:11         ` Marius Vollmer
  1 sibling, 0 replies; 13+ messages in thread
From: Marius Vollmer @ 2006-03-25 20:11 UTC (permalink / raw)
  Cc: steven mestdagh, Guile Development

Neil Jerram <neil@ossau.uklinux.net> writes:

> [...] I wonder why the change was made to remove the gc_os_dep.c
> fallback option; I can't see anything obvious in the ChangeLog.
> (gc_os_dep.c and the necessary scm_get_stack_base() definitions are
> still there in 1.8, they're just not used.)

I guess that was mostly an overreaction on my part; we can and
probably should bring gc_os_dep.c back.

I had the feeling that gc_os_dep.c was actually causing more
portability problems then it solved since it frequently failed to
compile, and I was hoping to get rid of it.

But now seems to be a good time to get it working again for 1.8.1.

I'll do that.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-11 18:43           ` Neil Jerram
  2006-03-11 19:02             ` steven mestdagh
@ 2006-03-25 20:16             ` Marius Vollmer
  2006-03-26  0:01               ` Marius Vollmer
  1 sibling, 1 reply; 13+ messages in thread
From: Marius Vollmer @ 2006-03-25 20:16 UTC (permalink / raw)
  Cc: steven mestdagh, Guile Development

Neil Jerram <neil@ossau.uklinux.net> writes:

> (And interestingly, this program says that __libc_stack_end isn't
> needed on my Debian GNU/Linux, despite the comment in threads.c
> suggesting that it _is_ needed on Linux.)

Ahh.  Maybe I just had a buggy version of LinuxThreads at the time.  I
just tried again on PPC GNU/Linux with libc 2.3.6 (if that is
relevant), and I don't need __libc_stack_end either.

I will include the test program into configure.in and only use
__libc_stack_end (or gc_os_dep) when it is really needed.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-25 20:16             ` Marius Vollmer
@ 2006-03-26  0:01               ` Marius Vollmer
  2006-03-26  9:20                 ` steven mestdagh
  0 siblings, 1 reply; 13+ messages in thread
From: Marius Vollmer @ 2006-03-26  0:01 UTC (permalink / raw)
  Cc: steven mestdagh, Guile Development

Marius Vollmer <mvo@zagadka.de> writes:

> I will include the test program into configure.in and only use
> __libc_stack_end (or gc_os_dep) when it is really needed.

Done.  Steven, please test: either from the "branch_release_1-8"
branch in CVS or a nightly snapshot at

   ftp://ftp.dt.e-technik.uni-dortmund.de/pub/guile/snapshots

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: undefined reference to `scm_init_guile'
  2006-03-26  0:01               ` Marius Vollmer
@ 2006-03-26  9:20                 ` steven mestdagh
  0 siblings, 0 replies; 13+ messages in thread
From: steven mestdagh @ 2006-03-26  9:20 UTC (permalink / raw)
  Cc: Guile Development, Neil Jerram

Marius Vollmer [2006-03-26, 02:01:16]:
> Marius Vollmer <mvo@zagadka.de> writes:
> 
> > I will include the test program into configure.in and only use
> > __libc_stack_end (or gc_os_dep) when it is really needed.
> 
> Done.  Steven, please test: either from the "branch_release_1-8"
> branch in CVS or a nightly snapshot at
> 
>    ftp://ftp.dt.e-technik.uni-dortmund.de/pub/guile/snapshots

i've tried the guile-core-1.8-20060325 snapshot

normal build errors out here:

./guile-snarf -o filesys.x
/usr/obj/ports/guile-1.8.0/guile-core-1.8-20060325/libguile/filesys.c
-DHAVE_CONFIG_H -I..
-I/usr/obj/ports/guile-1.8.0/guile-core-1.8-20060325
-I/usr/local/include -O2 -pipe -Wformat -Wbounded -Wall
-Wmissing-prototypes -Werror
/usr/obj/ports/guile-1.8.0/guile-core-1.8-20060325/libguile/filesys.c:204:1:
"dirfd" redefined
In file included from
/usr/obj/ports/guile-1.8.0/guile-core-1.8-20060325/libguile/filesys.c:115:
/usr/include/dirent.h:74:1: this is the location of the previous
definition

then I removed -Werror, and it proceeds but fails with the following:

cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc
continuations.doc debug.doc deprecation.doc deprecated.doc
discouraged.doc dynl.doc dynwind.doc environments.doc eq.doc error.doc
eval.doc evalext.doc extensions.doc feature.doc fluids.doc fports.doc
futures.doc gc.doc goops.doc gsubr.doc gc-mark.doc gc-segment.doc
gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc hooks.doc
i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc
macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc
options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc
properties.doc random.doc rdelim.doc read.doc root.doc rw.doc
scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc
stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc srfi-13.doc
srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc threads.doc
throw.doc values.doc variable.doc vectors.doc version.doc vports.doc
weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc
socket.doc regex-posix.doc |
GUILE="/usr/obj/ports/guile-1.8.0/build-i386/pre-inst-guile"
/usr/obj/ports/guile-1.8.0/guile-core-1.8-20060325/scripts/snarf-check-and-output-texi
--manual > guile.texi || { rm guile.texi; false; }
ERROR: Unbound variable: make-mutex


steven

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-03-26  9:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-09 22:35 [Neil Jerram] Re: undefined reference to `scm_init_guile' Neil Jerram
2006-03-10  6:41 ` steven mestdagh
2006-03-10 22:10   ` Neil Jerram
2006-03-10 22:23     ` steven mestdagh
2006-03-10 22:41       ` Neil Jerram
2006-03-10 23:01         ` steven mestdagh
2006-03-11 18:43           ` Neil Jerram
2006-03-11 19:02             ` steven mestdagh
2006-03-11 20:45               ` Neil Jerram
2006-03-25 20:16             ` Marius Vollmer
2006-03-26  0:01               ` Marius Vollmer
2006-03-26  9:20                 ` steven mestdagh
2006-03-25 20:11         ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).