The core modules are either built with a pike glue file, or if one isn't provided, a two line glue file is automatically generated. /.../
Sorry, but that's not correct. You must be looking at a pike built with static modules. They get a glue file to appear in the right spot in the namespace, but dynamic ones don't need that.
True, and something that I shouldn't have let slip. It was copied from somewhere within the pike tree, so somewhere there's a testsuite that has behavior that might not be so good test-wise. /.../
Some of the standard modules, e.g. Gmp, do that because they are optional, so the main testsuite still works when they are disabled. But that doesn't apply to third party modules.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-11-10 23:52: Subject: Re: pike external module documentation
Thanks for the feedback... I will try to get the changes you suggested incorporated.
Is it possible to build the docs for the module only, without merging it with the system docs?
I hadn't thought of this, but it should be possible, though right now the build assumes the modref would be installed in the system documentation directory pikedir/docs/modref. Again, this should be relatively simple to accomplish.
What about pike only modules? Should be trivial, but it'd still be nice if they too are covered by the standard tools so that they can be handled the same way. Maybe it works to provide a standard Makefile for that case, so that not even autoconf is required.
I checked some changes in about 2 weeks ago that should fix this. I've actually been testing on a pike-only module, and it seems to work just fine with a copy of pike from CVS.
Doesn't work for modules with no pike layer. Also, the check works better if it's a file which is very specific for the module.
That choice of filename was really just a suggestion; I assumed that the text following it would clarify that it would be wise to choose a relatively unique filename (i think i wrote that; but will check.)
Btw, you seem to assume that there always should be a pike glue file like that. Is it really necessary?
The core modules are either built with a pike glue file, or if one isn't provided, a two line glue file is automatically generated. I was merely following convention; whether it's a good or necessary convention I'll leave to others.
It should be enough with "VPATH=@srcdir@". (A while ago I cleaned up a lot of vpaths like that in the module tree - seems to have been a bad case of cut'n'paste back to very old code.)
I probably had that source file for a while, so i will fix this.
A bit odd example. In the testsuite for a specific module, isn't it better to assume it exists? If there has been some major problem so that the module isn't installed at all, one wouldn't expect it to silently pass the testsuite.
True, and something that I shouldn't have let slip. It was copied from somewhere within the pike tree, so somewhere there's a testsuite that has behavior that might not be so good test-wise. I was mostly interested in getting the framework together. I agree that I might have picked a better set of tests, but was in a bit of a hurry when i did it. It actually might be nice for someone with actual knowledge of the testsuite system to put together a few paragraphs about it.
/ Brevbäraren
Dynamic modules always get glue-files too now.
/ Per Hedbor ()
Previous text:
2003-11-11 00:37: Subject: Re: pike external module documentation
The core modules are either built with a pike glue file, or if one isn't provided, a two line glue file is automatically generated. /.../
Sorry, but that's not correct. You must be looking at a pike built with static modules. They get a glue file to appear in the right spot in the namespace, but dynamic ones don't need that.
True, and something that I shouldn't have let slip. It was copied from somewhere within the pike tree, so somewhere there's a testsuite that has behavior that might not be so good test-wise. /.../
Some of the standard modules, e.g. Gmp, do that because they are optional, so the main testsuite still works when they are disabled. But that doesn't apply to third party modules.
/ Martin Stjernholm, Roxen IS
That's what I thought; though I hadn't had a chance to verify that. I guess the original question still stands (more for personal information than anything else, as it doesn't really matter to me) is what is the rationale? Is there a benefit, and if so, what is it?
Bill
Dynamic modules always get glue-files too now.
/ Per Hedbor ()
Personally I find it to be irritating, if nothing else since it is now much harder to debug C-modules, you no longer get the errors from dlopen when they fail to load.
The reason is that .so-files now behave as .pike-files, not .pmod-files. This is somewhat more general, since its now possible to create C-level programs, not only modules, but the advantage is very small IMHO.
/ Per Hedbor ()
Previous text:
2003-11-11 16:16: Subject: Re: pike external module documentation
That's what I thought; though I hadn't had a chance to verify that. I guess the original question still stands (more for personal information than anything else, as it doesn't really matter to me) is what is the rationale? Is there a benefit, and if so, what is it?
Bill
Dynamic modules always get glue-files too now.
/ Per Hedbor ()
/ Brevbäraren
Based on the past statements, are the following two cases equivalent?
path.pmod/to.pmod/module.pmod/modulename.so
versus
path.pmod/to.pmod/___modulename.so
+
path.pmod/to.pmod/module.pmod/modulename.pike with the following contents:
inherit ___modulename;
If they were, it would certainly cut down on the amount of magic. especially if you can join a module.so with a module.pike (i think i remember someone saying this was possible.
Bill
On Tue, 11 Nov 2003, Per Hedbor () @ Pike (-) developers forum wrote:
Personally I find it to be irritating, if nothing else since it is now much harder to debug C-modules, you no longer get the errors from dlopen when they fail to load.
The reason is that .so-files now behave as .pike-files, not .pmod-files. This is somewhat more general, since its now possible to create C-level programs, not only modules, but the advantage is very small IMHO.
/ Per Hedbor ()
Previous text:
2003-11-11 16:16: Subject: Re: pike external module documentation
That's what I thought; though I hadn't had a chance to verify that. I guess the original question still stands (more for personal information than anything else, as it doesn't really matter to me) is what is the rationale? Is there a benefit, and if so, what is it?
Bill
Dynamic modules always get glue-files too now.
/ Per Hedbor ()
/ Brevb�raren
I assume the dirname "module.pmod" just was a coincidence; having a directory with that name would be pointless and will probably not work very well.
To answer your question: No, but this should be equivalent:
Path.pmod/To.pmod/Module.pmod/Class.so
and
Path.pmod/To.pmod/Module.pmod/___Class.so + Path.pmod/To.pmod/Module.pmod/Class.pike containing "inherit ___Class;":
/ Martin Stjernholm, Roxen IS
Previous text:
2003-11-11 19:42: Subject: Re: pike external module documentation
Based on the past statements, are the following two cases equivalent?
path.pmod/to.pmod/module.pmod/modulename.so
versus
path.pmod/to.pmod/___modulename.so
path.pmod/to.pmod/module.pmod/modulename.pike with the following contents:
inherit ___modulename;
If they were, it would certainly cut down on the amount of magic. especially if you can join a module.so with a module.pike (i think i remember someone saying this was possible.
Bill
On Tue, 11 Nov 2003, Per Hedbor () @ Pike (-) developers forum wrote:
Personally I find it to be irritating, if nothing else since it is now much harder to debug C-modules, you no longer get the errors from dlopen when they fail to load.
The reason is that .so-files now behave as .pike-files, not .pmod-files. This is somewhat more general, since its now possible to create C-level programs, not only modules, but the advantage is very small IMHO.
/ Per Hedbor ()
Previous text:
2003-11-11 16:16: Subject: Re: pike external module documentation
That's what I thought; though I hadn't had a chance to verify that. I guess the original question still stands (more for personal information than anything else, as it doesn't really matter to me) is what is the rationale? Is there a benefit, and if so, what is it?
Bill
Dynamic modules always get glue-files too now.
/ Per Hedbor ()
/ Brevbäraren
/ Brevbäraren
Right, I was looking at a 7.4 there. Sorry for the misinformation.
Wasn't it the #if constant(...) checks that hid those errors? They're gone now from the automatically generated glue files.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-11-11 16:40: Subject: Re: pike external module documentation
Personally I find it to be irritating, if nothing else since it is now much harder to debug C-modules, you no longer get the errors from dlopen when they fail to load.
The reason is that .so-files now behave as .pike-files, not .pmod-files. This is somewhat more general, since its now possible to create C-level programs, not only modules, but the advantage is very small IMHO.
/ Per Hedbor ()
Not really, no:
# dhcp-141$ pike -e ___GL -:3:Error resolving '___GL'. load_module("/usr/local/pike/7.5.12/lib/modules/___GL.so") failed: /usr/local/pike/7.5.12/lib/modules/___GL.so: undefined symbol: GL_add_auto_funcs
# dhcp-141$ pike -e GL /usr/local/pike/7.5.12/lib/modules/GL.pmod:4:Illegal program pointer. -:3:Error resolving 'GL'. Cast '/usr/local/pike/7.5.12/lib/modules/GL.pmod' to object failed.
/ Per Hedbor ()
Previous text:
2003-11-12 20:51: Subject: Re: pike external module documentation
Right, I was looking at a 7.4 there. Sorry for the misinformation.
Wasn't it the #if constant(...) checks that hid those errors? They're gone now from the automatically generated glue files.
/ Martin Stjernholm, Roxen IS
But that looks like an error propagation bug in the compiler. If indexing a module during the first pass caused an exception, that exception was ignored. But since the inherit has to succeed in the first pass it never continues to the second so that the error gets reported. I've changed it now to never ignore the error.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-11-13 14:02: Subject: Re: pike external module documentation
Not really, no:
# dhcp-141$ pike -e ___GL -:3:Error resolving '___GL'. load_module("/usr/local/pike/7.5.12/lib/modules/___GL.so") failed: /usr/local/pike/7.5.12/lib/modules/___GL.so: undefined symbol: GL_add_auto_funcs
# dhcp-141$ pike -e GL /usr/local/pike/7.5.12/lib/modules/GL.pmod:4:Illegal program pointer. -:3:Error resolving 'GL'. Cast '/usr/local/pike/7.5.12/lib/modules/GL.pmod' to object failed.
/ Per Hedbor ()
pike-devel@lists.lysator.liu.se