Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: libintl.a for Strawberry Perl

by fdesar (Beadle)
on Jan 25, 2019 at 16:11 UTC ( [id://1228985]=note: print w/replies, xml ) Need Help??


in reply to Re^3: libintl.a for Strawberry Perl
in thread libintl.a for Strawberry Perl

OK, now I can compile Locale::gettext correctly. But unfortunatly, the gettext.xs.dll it builds up won't load.

I used the Strawberry portable Perl 64 with the standard build method (as cpan fails) by downloading the module and doing perl Makefile.PL; gmake to generate it. And it fails on gmake test.

If I ldd gettext.xs.dll, I find it has some unknown unresolved references:

ldd.exe gettext.xs.dll ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffb4d030000) KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffb4ac300 +00) KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffb49 +e50000) ??? => ??? (0x67a00000) ??? => ??? (0x7ffb4a490000)

but "???" doesn't really help to identify the problem. I suspect it still has something to do with 32bit vs 64bit but don't really know what to do next. Searching... :-)

I think the two unknown references should have been:

apphelp.dll => /c/Windows/SYSTEM32/apphelp.dll (0x7ffb47210000) msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffb4a490000)

Here is the log of gmake in case it could help:

"C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\perl\bin\perl.ex +e" -MExtUtils::Command::MM -e cp_nonempty -- gettext.bs blib\arch\aut +o\Locale\gettext\gettext.bs 644^M "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\perl\bin\perl.ex +e" "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\perl\lib\Ext +Utils/xsubpp" -typemap C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-p +ortable\perl\lib\ExtUtils\typemap gettext.xs > gettext.xsc^M Please specify prototyping behavior for gettext.xs (see perlxs manual) +^M "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\perl\bin\perl.ex +e" -MExtUtils::Command -e mv -- gettext.xsc gettext.c^M gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDI +O -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS + -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -D +VERSION=\"1.07\" -DXS_VERSION=\"1.07\" "-IC:\Users\Moi\strawberry-pe +rl-5.28.1.1-64bit-portable\perl\lib\CORE" gettext.c^M "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\perl\bin\perl.ex +e" -MExtUtils::Mksymlists \^M -e "Mksymlists('NAME'=>\"Locale::gettext\", 'DLBASE' => 'gettext' +, 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' +=> []);"^M g++.exe gettext.def -o blib\arch\auto\Locale\gettext\gettext.xs.dll -m +dll -s -L"C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\perl\l +ib\CORE" -L"C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\c\li +b" gettext.o "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\ +perl\lib\CORE\libperl528.a" "C:\Users\Moi\strawberry-perl-5.28.1.1-64 +bit-portable\c\lib\libintl.a" "C:\Users\Moi\strawberry-perl-5.28.1.1- +64bit-portable\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\Users\Moi\ +strawberry-perl-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32\lib\libk +ernel32.a" "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\c\x8 +6_64-w64-mingw32\lib\libuser32.a" "C:\Users\Moi\strawberry-perl-5.28. +1.1-64bit-portable\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\Users\Moi +\strawberry-perl-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32\lib\lib +winspool.a" "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\c\x +86_64-w64-mingw32\lib\libcomdlg32.a" "C:\Users\Moi\strawberry-perl-5. +28.1.1-64bit-portable\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\Use +rs\Moi\strawberry-perl-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32\l +ib\libshell32.a" "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portabl +e\c\x86_64-w64-mingw32\lib\libole32.a" "C:\Users\Moi\strawberry-perl- +5.28.1.1-64bit-portable\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\U +sers\Moi\strawberry-perl-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32 +\lib\libnetapi32.a" "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-port +able\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\Users\Moi\strawberry-per +l-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32\lib\libws2_32.a" "C:\U +sers\Moi\strawberry-perl-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32 +\lib\libmpr.a" "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\ +c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\Users\Moi\strawberry-perl-5. +28.1.1-64bit-portable\c\x86_64-w64-mingw32\lib\libversion.a" "C:\User +s\Moi\strawberry-perl-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32\li +b\libodbc32.a" "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\ +c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\Users\Moi\strawberry-perl +-5.28.1.1-64bit-portable\c\x86_64-w64-mingw32\lib\libcomctl32.a" -Wl, +--enable-auto-image-base^M "C:\Users\Moi\strawberry-perl-5.28.1.1-64bit-portable\perl\bin\perl.ex +e" -MExtUtils::Command -e chmod -- 755 blib\arch\auto\Locale\gettext\ +gettext.xs.dll^

Replies are listed 'Best First'.
Re^5: libintl.a for Strawberry Perl
by syphilis (Archbishop) on Jan 26, 2019 at 06:51 UTC
    If I ldd gettext.xs.dll, I find it has some unknown unresolved references

    I don't understand the ldd output, but yours looks pretty normal compared to other 64-bit strawberry xs.dlls that are not troublesome. For example, for lib/auto/Win32/Win32.xs.dll, I'm seeing:
    $ ldd.exe lib/auto/Win32/Win32.xs.dll ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x76db0000) kernel32.dll => /c/Windows/system32/kernel32.dll (0x76c90000) KERNELBASE.dll => /c/Windows/system32/KERNELBASE.dll (0x7fefc9 +d0000) ??? => ??? (0x64cc0000)
    What's the error message you're seeing when gettext.xs.dll fails to load ? (It's likely not very helpful ... but worth a try.)
    Are there any pop-ups associated with the failure ? If so, what message so they provide ?

    When I want to build an import library from a dll, I start with gendef.exe (which ships with strawberry) and use it to create a def file:
    gendef -a mydll.dll then, using the generated mydll.def: dlltool --kill-at --input-def mydll.def --output-lib libmydll.a
    I don't know if that is what you need, or if it will provide better mileage than VinsWorldcom's method using pexports.

    If you're using MSYS2 dlls, you'll want the ones that are in the mingw64\bin - and then you might as well just use the associated import lib (.dll.a) in the mingw64\lib folder.
    The mingw64\lib folder also probably provides static (.a) libs if you want to avoid the dll dependency.

    Cheers,
    Rob
Re^5: libintl.a for Strawberry Perl
by bliako (Monsignor) on Jan 26, 2019 at 11:10 UTC

    My impression is that both perl and XS module should be compiled with the same compiler (useful discussion here: How to make an XS module with a different C compiler?). Ot at least it removes an uncertainty with your troubleshooting.

    To see what compiler my perl is compiled with I do: perl -MConfig -e 'print $Config{cc}' (likewise print the Config hash to see cppflags and ldflags).

    bw, bliako

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1228985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-25 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found