Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Inline CPAN distribution.

Report information
The Basics
Id: 19624
Status: resolved
Priority: 0/
Queue: Inline

People
Owner: Nobody in particular
Requestors: roger.wyatt [...] nomadsoft.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.44
Fixed in: (no value)



Subject: Inline::Structs Configuration of LIB and INC are ignored when using structs
Config for Inline C of LIB or INC parameters are ignored if the STRUCT config parameter is stated afterwards. If STRUCT is specified before then the STRUCT parameter is ignored. If stated in the same configuration section then LIB and INC are ignored. OS: HP-UX B.11.11 U 9000/800 Perl: v5.6.1 built for PA-RISC1.1-thread-multi (32bit build) Inline version: Inline-0.44 Inline::Struct version: Inline-Struct-0.06 gcc version: 3.4.3 EXAMPLE 1: The STRUCT configuration is ignored when the following configuration is used. use Inline C => (Config => STRUCTS => ['Cstruct'] ); use Inline C => (Config => BUILD_NOISY => 1, LIBS => '-L/src/libdir1 -L/src/libdir2 -L/src/libdir3 -llib1 -llib2 -llib3', INC => '-I/include/dir1 \ -I/include/dir2 \ -I/include/dir3' ); EXAMPLE 2: The STRUCT is used and the structure methods are properly created, but the LIBS and INC configuration is ignored. use Inline C => (Config => BUILD_NOISY => 1, LIBS => '-L/src/libdir1 -L/src/libdir2 -L/src/libdir3 -llib1 -llib2 -llib3', INC => '-I/include/dir1 \ -I/include/dir2 \ -I/include/dir3' ); use Inline C => (Config => STRUCTS => ['Cstruct'] ); EXAMPLE 3: The STRUCT is used and the structure methods are properly created, but the LIBS and INC configuration is ignored. use Inline C => (Config => BUILD_NOISY => 1, STRUCTS => ['Cstruct'], LIBS => '-L/src/libdir1 -L/src/libdir2 -L/src/libdir3 -llib1 -llib2 -llib3', INC => '-I/include/dir1 \ -I/include/dir2 \ -I/include/dir3' );
On Wed May 31 16:35:11 2006, guest wrote: Show quoted text
> Config for Inline C of LIB or INC parameters are ignored if the STRUCT > config parameter is stated afterwards. If STRUCT is specified before > then the STRUCT parameter is ignored. If stated in the same > configuration section then LIB and INC are ignored. > > OS: HP-UX B.11.11 U 9000/800 > Perl: v5.6.1 built for PA-RISC1.1-thread-multi (32bit build) > Inline version: Inline-0.44 > Inline::Struct version: Inline-Struct-0.06 > gcc version: 3.4.3 > > > > EXAMPLE 1: > The STRUCT configuration is ignored when the following configuration is > used. > use Inline C => (Config => STRUCTS => ['Cstruct'] ); > use Inline C => (Config => > BUILD_NOISY => 1, > LIBS => '-L/src/libdir1 > -L/src/libdir2 > -L/src/libdir3 > -llib1 -llib2 -llib3', > INC => '-I/include/dir1 \ > -I/include/dir2 \ > -I/include/dir3' ); > > > > EXAMPLE 2: > The STRUCT is used and the structure methods are properly created, but > the LIBS and INC configuration is ignored. > use Inline C => (Config => > BUILD_NOISY => 1, > LIBS => '-L/src/libdir1 > -L/src/libdir2 > -L/src/libdir3 > -llib1 -llib2 -llib3', > INC => '-I/include/dir1 \ > -I/include/dir2 \ > -I/include/dir3' ); > use Inline C => (Config => STRUCTS => ['Cstruct'] ); > > > > EXAMPLE 3: > The STRUCT is used and the structure methods are properly created, but > the LIBS and INC configuration is ignored. > use Inline C => (Config => > BUILD_NOISY => 1, > STRUCTS => ['Cstruct'], > LIBS => '-L/src/libdir1 > -L/src/libdir2 > -L/src/libdir3 > -llib1 -llib2 -llib3', > INC => '-I/include/dir1 \ > -I/include/dir2 \ > -I/include/dir3' ); >
***** Actually it is just INC that is ignored and not LIB.
On Thu Jun 01 05:55:49 2006, guest wrote: Show quoted text
> On Wed May 31 16:35:11 2006, guest wrote:
Show quoted text
> > EXAMPLE 3: > > The STRUCT is used and the structure methods are properly created,
but Show quoted text
> > the LIBS and INC configuration is ignored. > > use Inline C => (Config => > > BUILD_NOISY => 1, > > STRUCTS => ['Cstruct'], > > LIBS => '-L/src/libdir1 > > -L/src/libdir2 > > -L/src/libdir3 > > -llib1 -llib2 -llib3', > > INC => '-I/include/dir1 \ > > -I/include/dir2 \ > > -I/include/dir3' ); > >
> > > ***** Actually it is just INC that is ignored and not LIB.
Are you sure about Example 3 ? I can see that Examples 1 and 2 will behave as you say because the second 'use Inline C => Config' overwrites the first - even though (by my reading of 'perldoc Inline') the docs say that won't happen. This can be demonstrated with just: use Inline C => Config => BUILD_NOISY => 1; use Inline C => Config => CLEAN_AFTER_BUILD => 1; A script containing that will not BUILD_NOISY, but a script containing the following will BUILD_NOISY: use Inline C => Config => BUILD_NOISY => 1, CLEAN_AFTER_BUILD => 1; However, Example 3 contains only the one 'use Inline C => Config =>', and I would have expected it to work. Could it be that the backslashes in the INC entry are screwing things up ?
Show quoted text
> > Are you sure about Example 3 ? I can see that Examples 1 and 2 will > behave as you say because the second 'use Inline C => Config' > overwrites the first - even though (by my reading of 'perldoc Inline') > the docs say that won't happen. This can be demonstrated with just: > > use Inline C => Config => BUILD_NOISY => 1; > use Inline C => Config => CLEAN_AFTER_BUILD => 1; > > A script containing that will not BUILD_NOISY, but a script containing > the following will BUILD_NOISY: > > use Inline C => Config => > BUILD_NOISY => 1, > CLEAN_AFTER_BUILD => 1; > > However, Example 3 contains only the one 'use Inline C => Config =>', > and I would have expected it to work. Could it be that the backslashes > in the INC entry are screwing things up ? > > > >
Thanks for the response. I tried far more combinaitions than the 3 that I posted and that includes use Inline C => (Config => BUILD_NOISY => 1, STRUCTS => ['Cstruct'], LIBS => '-L/src/libdir1 -L/src/libdir2 -L/src/libdir3 -llib1 -llib2 -llib3', INC => '-I/include/dir1 -I/include/dir2 -I/include/dir3' ); I did note that to list Libraries on different lines I should not include the '\'. If I do I get... Unrecognized argument in LIBS ignored: '\' But if omit the '\' from the INC parameter I get an error. Regardless the example above does not work. But if I remove the STRUCTS config then the INC parameter is used. However, what does work is the following... use Inline C => (Config => BUILD_NOISY => 1, STRUCTS => ['Cstruct'], LIBS => '-L/src/libdir1 -L/src/libdir2 -L/src/libdir3 -llib1 -llib2 -llib3', CCFLAGS => '-I/include/dir1 \ -I/include/dir2 \ -I/include/dir3' );
RT-Send-CC: sisyphus [...] cpan.org
Since Inline::Struct is very buggy and has not been updated since 2001 (see http://grokbase.com/t/perl/inline/06ac69a1mx/how-to-use-inline-structs ), is there any reason to leave this ticket open anymore?
Inline::Structs is old, buggy and not used - currently irrelevant