Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #34059] [PATCH][MSWin32] Add NCI test symbols

6 views
Skip to first unread message

Ron Blaschke

unread,
Feb 5, 2005, 9:37:43 AM2/5/05
to bugs-bi...@rt.perl.org
# New Ticket Created by Ron Blaschke
# Please include the string: [perl #34059]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34059 >


Attached patch adds missing NCI test symbols.

This get tests t/pmc/nci.t #8, #51 and #52 to pass again.

Ron

mswin32_add_nci_symbols.patch

Ron Blaschke

unread,
Feb 5, 2005, 1:32:16 PM2/5/05
to Ron Blaschke, bugs-bi...@netlabs.develooper.com, perl6-i...@perl.org
Sorry for the inconvenience, but please drop the original patch, and
use this one instead.

This patch adds all missing export symbols to libnci_test.dll that are
needed by t/pmc/nci.t.

t\pmc\nci....ok
All tests successful.
Files=1, Tests=56, 18 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)

Ron

mswin32_add_nci_symbols.patch

Chromatic

unread,
Feb 5, 2005, 3:58:09 PM2/5/05
to p6i, Ron Blaschke, bugs-bi...@netlabs.develooper.com
On Sat, 2005-02-05 at 19:32 +0100, Ron Blaschke wrote:

> This patch adds all missing export symbols to libnci_test.dll that are
> needed by t/pmc/nci.t.

Why not generate the .def file instead of hoping that people add the
correct symbols? Here's a patch that seems to do the trick for me
(though not running Windows, I can't really test if the defines are all
correct).

-- c


generate_libncitestdef.patch

Chromatic

unread,
Feb 5, 2005, 4:03:19 PM2/5/05
to p6i, Ron Blaschke, bugs-bi...@netlabs.develooper.com
On Sat, 2005-02-05 at 12:58 -0800, chromatic wrote:

> Why not generate the .def file instead of hoping that people add the
> correct symbols? Here's a patch that seems to do the trick for me
> (though not running Windows, I can't really test if the defines are all
> correct).

Actually it doesn't, because of a typo in the makefile source. Ignore
that one in favor of this one.

-- c


generate_libncitestdef.patch

Ron Blaschke

unread,
Feb 5, 2005, 4:32:24 PM2/5/05
to chromatic, p6i, Ron Blaschke

I haven't checked the details, but I think this will not work, as it
seems to generates a list of all symbols beginning with nci_, but
'int_cb_D4' is used, too.

Previously, I have proposed adding 'PARROT_API' to declarations, and
grep for them, or expand them to '__declspec(dllexport)' on Windows.
#31649: [TODO] Win32 - Automatically Export Symbols
http://rt.perl.org/rt3/Ticket/Display.html?id=31649

Another idea would be to create a "symbol list file" for each library,
which contains only the symbol names, from which the .def file would
be derived (maybe another platform has similar needs?).

Ron

Leopold Toetsch

unread,
Feb 6, 2005, 5:00:38 AM2/6/05
to Ron Blaschke, perl6-i...@perl.org
Ron Blaschke <mailin...@rblasch.org> wrote:

> This patch adds all missing export symbols to libnci_test.dll that are
> needed by t/pmc/nci.t.

Thanks, applied.
leo

Bernhard Schmalhofer

unread,
Feb 7, 2005, 7:57:20 AM2/7/05
to Ron Blaschke, chromatic, p6i, Ron Blaschke
Ron Blaschke wrote:
>
>>>Why not generate the .def file instead of hoping that people add the
>>>correct symbols? Here's a patch that seems to do the trick for me
>>>(though not running Windows, I can't really test if the defines are all
>>>correct).
>>

> I haven't checked the details, but I think this will not work, as it


> seems to generates a list of all symbols beginning with nci_, but
> 'int_cb_D4' is used, too.

nci_test.c is used only for testing. So there is no harm in renaming the
symbols as needed.

> Previously, I have proposed adding 'PARROT_API' to declarations, and
> grep for them, or expand them to '__declspec(dllexport)' on Windows.

This might work for 'parrot.dll', but not for libnci_test.dll, as it
isn't a part of the interface on Parrot.

> #31649: [TODO] Win32 - Automatically Export Symbols
> http://rt.perl.org/rt3/Ticket/Display.html?id=31649

CU, Bernhard

--
**************************************************
Dipl.-Physiker Bernhard Schmalhofer
Senior Developer
Biomax Informatics AG
Lochhamer Str. 11
82152 Martinsried, Germany
Tel: +49 89 895574-839
Fax: +49 89 895574-825
eMail: Bernhard.S...@biomax.com
Website: www.biomax.com
**************************************************

Ron Blaschke

unread,
Feb 7, 2005, 1:20:39 PM2/7/05
to Bernhard Schmalhofer, chromatic, p6i
Bernhard Schmalhofer wrote:

> Ron Blaschke wrote:
>> I haven't checked the details, but I think this will not work, as it
>> seems to generates a list of all symbols beginning with nci_, but
>> 'int_cb_D4' is used, too.
> nci_test.c is used only for testing. So there is no harm in renaming the
> symbols as needed.

>> Previously, I have proposed adding 'PARROT_API' to declarations, and
>> grep for them, or expand them to '__declspec(dllexport)' on Windows.
> This might work for 'parrot.dll', but not for libnci_test.dll, as it
> isn't a part of the interface on Parrot.

How about this: We separate things into 2 steps.
1) Create a .sym file for each relevant compilation unit.
2) Join the .sym files for all to-be-linked objects and create the
.def file. (on Windows)

Now things boil down to creating the .sym files. These might be
created by grepping the source for C<nci_>, C<Parrot_>, etc, or
by whatever script created the compilation unit.

Disclaimer: I might have shamelessly stolen one idea or the other from
the perl source. ;-)

Ron


Ron Blaschke via RT

unread,
Feb 19, 2005, 8:37:40 AM2/19/05
to perl6-i...@perl.org
t/pmc/nci.t passes. This ticket should be closed.

t\pmc\nci....ok
All tests successful.

Files=1, Tests=56, 20 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)


The ticket for the more generic solution is

0 new messages