unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Adding New C Files
@ 2010-06-13 14:26 Noah Lavine
  2010-06-14 21:39 ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Noah Lavine @ 2010-06-13 14:26 UTC (permalink / raw)
  To: guile-devel

How does one add new C files to libguile?

I'm asking because I'm trying to add a C file and header with some JIT
code, and I've given myself build errors. So far I've put the C file
in Makefile.am's list of sources, and the header in Makefile.am's list
of headers. I then ran 'make -k distclean' and tried to build. The
result has been a series of build warnings that "GUILE_USE_64_CALLS"
is not defined in _scm.h and then this broken pipe error when making
the documentation (which is odd, because I didn't add any
documentation files, or change the Makefile.am sections that deal with
them):

/bin/sh: line 1: 48716 Broken pipe             cat alist.doc
arbiters.doc array-handle.doc array-map.doc arrays.doc async.doc
backtrace.doc boolean.doc bitvectors.doc bytevectors.doc chars.doc
control.doc continuations.doc debug.doc deprecated.doc deprecation.doc
discouraged.doc dynl.doc dynwind.doc eq.doc error.doc eval.doc
evalext.doc expand.doc extensions.doc feature.doc fluids.doc
foreign.doc fports.doc gc-malloc.doc gc.doc gettext.doc
generalized-arrays.doc generalized-vectors.doc goops.doc gsubr.doc
guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc
ioext.doc keywords.doc list.doc load.doc macros.doc mallocs.doc
memoize.doc modules.doc numbers.doc objprop.doc options.doc pairs.doc
ports.doc print.doc procprop.doc procs.doc promises.doc properties.doc
r6rs-ports.doc random.doc rdelim.doc read.doc root.doc rw.doc
scmsigs.doc script.doc simpos.doc smob.doc sort.doc srcprop.doc
srfi-13.doc srfi-14.doc srfi-4.doc stackchk.doc stacks.doc stime.doc
strings.doc strorder.doc strports.doc struct.doc symbols.doc
threads.doc throw.doc trees.doc uniform.doc values.doc variable.doc
vectors.doc version.doc vports.doc weaks.doc dynl.doc filesys.doc
posix.doc net_db.doc socket.doc regex-posix.doc
     48717 Abort trap              | GUILE_AUTO_COMPILE=0
../meta/uninstalled-env guile-tools snarf-check-and-output-texi >
guile-procedures.texi

Thanks
Noah



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

* Re: Adding New C Files
  2010-06-13 14:26 Adding New C Files Noah Lavine
@ 2010-06-14 21:39 ` Andy Wingo
  2010-06-15 14:06   ` Noah Lavine
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Wingo @ 2010-06-14 21:39 UTC (permalink / raw)
  To: Noah Lavine; +Cc: guile-devel

On Sun 13 Jun 2010 16:26, Noah Lavine <noah.b.lavine@gmail.com> writes:

> How does one add new C files to libguile?

Look for e.g. all the lines that start with "alist." in the Makefile.am,
and copy them to your new file. If you don't use SCM_DEFINE et al, you
might not need to copy the .doc or .x lines.

Cheers,

Andy
-- 
http://wingolog.org/



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

* Re: Adding New C Files
  2010-06-14 21:39 ` Andy Wingo
@ 2010-06-15 14:06   ` Noah Lavine
  2010-06-15 20:34     ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Noah Lavine @ 2010-06-15 14:06 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

I've tried this, but I still get the error. Currently my files are in
every long list of files (.c, .doc, .x, and .h), and I don't see any
other places where source files for the main Guile program are listed.
Is there anything else I can try?

Thanks a lot
Noah

On Mon, Jun 14, 2010 at 5:39 PM, Andy Wingo <wingo@pobox.com> wrote:
> On Sun 13 Jun 2010 16:26, Noah Lavine <noah.b.lavine@gmail.com> writes:
>
>> How does one add new C files to libguile?
>
> Look for e.g. all the lines that start with "alist." in the Makefile.am,
> and copy them to your new file. If you don't use SCM_DEFINE et al, you
> might not need to copy the .doc or .x lines.
>
> Cheers,
>
> Andy
> --
> http://wingolog.org/
>



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

* Re: Adding New C Files
  2010-06-15 14:06   ` Noah Lavine
@ 2010-06-15 20:34     ` Andy Wingo
  2010-06-18  2:14       ` Noah Lavine
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Wingo @ 2010-06-15 20:34 UTC (permalink / raw)
  To: Noah Lavine; +Cc: guile-devel

On Tue 15 Jun 2010 16:06, Noah Lavine <noah.b.lavine@gmail.com> writes:

> I've tried this, but I still get the error. Currently my files are in
> every long list of files (.c, .doc, .x, and .h), and I don't see any
> other places where source files for the main Guile program are listed.
> Is there anything else I can try?

Perhaps I misstated:

>> If you don't use SCM_DEFINE et al, you
>> might not need to copy the .doc or .x lines.

That should be, "you might need not to copy ..." :) Try removing the
.doc and/or .x forms.

Andy
-- 
http://wingolog.org/



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

* Re: Adding New C Files
  2010-06-15 20:34     ` Andy Wingo
@ 2010-06-18  2:14       ` Noah Lavine
  2010-06-18  8:45         ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Noah Lavine @ 2010-06-18  2:14 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Thanks a lot!

I'm afraid the new C file issue is interacting with some other problem
in a strange way. I find that running this:

../meta/uninstalled-env guile-tools

in the command line in libguile will produce the message "Abort trap".

That command is run as part of the larger command

cat <lots of .doc files> | GUILE_AUTO_COMPILE=0
../meta/uninstalled-env guile-tools snarf-check-and-output-texi >
guile-procedures.texi

as part of the build process, which is what was causing my build to fail.

However, if I run it with a regular guile interpreter instead of the
uninstalled-env one, it works fine:

cat <lots of .doc files> | GUILE_AUTO_COMPILE=0 ../../bin/guile
../meta/guile-tools snarf-check-and-output-texi > /dev/null

returns normally.

Therefore I believe there is a bug in meta/uninstalled-env, but I'm
unsure why building the git trunk seemed to work fine. Could you (or
anyone) guess what this might be?

Thanks
Noah

On Tue, Jun 15, 2010 at 4:34 PM, Andy Wingo <wingo@pobox.com> wrote:
> On Tue 15 Jun 2010 16:06, Noah Lavine <noah.b.lavine@gmail.com> writes:
>
>> I've tried this, but I still get the error. Currently my files are in
>> every long list of files (.c, .doc, .x, and .h), and I don't see any
>> other places where source files for the main Guile program are listed.
>> Is there anything else I can try?
>
> Perhaps I misstated:
>
>>> If you don't use SCM_DEFINE et al, you
>>> might not need to copy the .doc or .x lines.
>
> That should be, "you might need not to copy ..." :) Try removing the
> .doc and/or .x forms.
>
> Andy
> --
> http://wingolog.org/
>



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

* Re: Adding New C Files
  2010-06-18  2:14       ` Noah Lavine
@ 2010-06-18  8:45         ` Andy Wingo
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Wingo @ 2010-06-18  8:45 UTC (permalink / raw)
  To: Noah Lavine; +Cc: guile-devel

On Fri 18 Jun 2010 04:14, Noah Lavine <noah.b.lavine@gmail.com> writes:

> ../meta/uninstalled-env guile-tools
>
> in the command line in libguile will produce the message "Abort trap".

[...]

> Therefore I believe there is a bug in meta/uninstalled-env, but I'm
> unsure why building the git trunk seemed to work fine. Could you (or
> anyone) guess what this might be?

No, this would be that your newly built Guile includes some invalid
instructions or something. Try meta/gdb-uninstalled-guile
--no-autocompile and see where it aborts.

Andy
-- 
http://wingolog.org/



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

end of thread, other threads:[~2010-06-18  8:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-13 14:26 Adding New C Files Noah Lavine
2010-06-14 21:39 ` Andy Wingo
2010-06-15 14:06   ` Noah Lavine
2010-06-15 20:34     ` Andy Wingo
2010-06-18  2:14       ` Noah Lavine
2010-06-18  8:45         ` Andy Wingo

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).