chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guidance requested for debugging import problem.


From: Matt Welland
Subject: Re: Guidance requested for debugging import problem.
Date: Sun, 14 Nov 2021 09:10:01 -0500

I went ahead and completed the minimal example build including the use of .import.o files to enable using modules in evals. See attached tar. It works fine which implies that, as you suggested, I have something wrong in my build system.

I do think this little sample build might be helpful for others ramping up on creating a chicken application. I could not find a sample app on the wiki, after getting input on best known methods I can add it.

On Sat, Nov 13, 2021 at 11:25 PM Matt Welland <mattrwelland@gmail.com> wrote:
The .import.o files are there to support access to modules in evals (there is a past email thread on this). Those files are compiled like this:

csc  -unit apimod.import -c apimod.import.scm -o apimod.import.o

I've attached a basic testcase that models the build without the import.o stuff. Please confirm it is correct and then I'll add an example of the .import.o files.

Thanks again.

On Sat, Nov 13, 2021 at 4:58 AM <felix.winkelmann@bevuta.com> wrote:
> Thanks Felix for looking. Both run with -:d and attached.
>
> I only see the following loading calls in dashboard.log:
>
> ; loading /home/matt/data/buildall/ck5.2/lib/chicken/11/
> chicken.time.import.so ...
> [debug] loading compiled library
> /home/matt/data/buildall/ck5.2/lib/chicken/11/chicken.time.import.so
> (0x0000555a9a701260)
> [debug] entering toplevel...
> ; loading ./debugprint.import.scm ...
> ; loading ./mtargs.import.scm ...
> ; loading ./commonmod.import.scm ...
> ; loading ./configfmod.import.scm ...

I'm not sure I fully understand the problem here, but these look strange:

[debug] entering apimod.import...
[debug] entering debugprint.import...
[debug] entering mtargs.import...
[debug] entering commonmod.import...
[debug] entering configfmod.import...
[debug] entering bigmod.import...

Are import-libraries compiled as modules? I think there might be a problem
with your build system - these messages indicate the modules of the names
given are compiled as library units / toplevel proceduresm which shouldn't be.
Import libraries are auxiliary files that are loaded or included, but do not
represent separate toplevel procedures. The latter are only created for library units
and modules. Please check how the shown files (apimod, etc.) are compiled
and with what options.


felix



--
--
Complexity is your enemy. Any fool can make something complicated.
It is hard to keep things simple. - Richard Branson.


--
--
Complexity is your enemy. Any fool can make something complicated.
It is hard to keep things simple. - Richard Branson.

Attachment: testbuild.tar.gz
Description: application/gzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]