You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "J. Matthew Pryor" <jm...@mobiquity.net> on 2006/08/01 08:57:53 UTC

maven-native-plugin & long command lines and individual files ...

does the native plugin always want files specified individually?
AFAICT I have to do this ...

    <source>
        <directory>${generated.native.source.dir}</directory>
        <fileNames>
            <fileName>devices.c</fileName>
            <fileName>errors.c</fileName>
        </fileNames>
        </source>
        <source>
        <directory>${basedir}/src/main/c</directory>
        <fileNames>
            <fileName>avrprog.c</fileName>
            <fileName>hpl_bootloader.c</fileName>

etc etc rather than *.c

The end result is that my final link line end up being too long for the
Windows command processor after it has passed each file with a fully
qualified path name to the linker

Error is :

The following character string is too long:
 -mmcu=atmega128 -gstabs
-Wl,-T,C:\projects\linkages\avr\ExeStatic/src/main/conf/avr5_ext.x
-Wl,-Map,ExeStatic.map -Wl,--defsym=__heap_start=0x804000
-Wl,--defsym=__heap_end=0x80ffff-Wl,--section-start=.jumptable=0x1efe8
-o
C:\projects\linkages\avr\ExeStatic\ges\avr\ExeStatic\target\hpl_coreio.objC:\projects\linkages\avr\ExeStatic\target\hpl_debugprot.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_ds1602.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_eeprom.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_flash.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_meminit.objC:\projects\linkages\avr\ExeStatic\target\hpl_misc.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_power.objC:\projects\linkages\avr\ExeStatic\target\hpl_radio.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_radioctl.objC:\projects\linkages\avr\ExeStatic\target\hpl_reset.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_serial.objC:\projects\linkages\avr\ExeStatic\target\hpl_spi.obj
C:\projects\linkages\avr\ExeStatic\target\hpl_timer.obj

[snip]

Is there any way to avoid this, I'd rather not have to beak it up into
separate libraries just to get it to link

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-native-plugin & long command lines and individual files ...

Posted by dan tran <da...@gmail.com>.
The current alpha-2-SNAPSHOT optimitizes the linker command using relative
paths.
Please try it out.

Please file a JIRA for wildcard support.


-Dan



On 7/31/06, J. Matthew Pryor <jm...@mobiquity.net> wrote:
>
> does the native plugin always want files specified individually?
> AFAICT I have to do this ...
>
>    <source>
>        <directory>${generated.native.source.dir}</directory>
>        <fileNames>
>            <fileName>devices.c</fileName>
>            <fileName>errors.c</fileName>
>        </fileNames>
>        </source>
>        <source>
>        <directory>${basedir}/src/main/c</directory>
>        <fileNames>
>            <fileName>avrprog.c</fileName>
>            <fileName>hpl_bootloader.c</fileName>
>
> etc etc rather than *.c
>
> The end result is that my final link line end up being too long for the
> Windows command processor after it has passed each file with a fully
> qualified path name to the linker
>
> Error is :
>
> The following character string is too long:
> -mmcu=atmega128 -gstabs
> -Wl,-T,C:\projects\linkages\avr\ExeStatic/src/main/conf/avr5_ext.x
> -Wl,-Map,ExeStatic.map -Wl,--defsym=__heap_start=0x804000
> -Wl,--defsym=__heap_end=0x80ffff-Wl,--section-start=.jumptable=0x1efe8
> -o
>
> C:\projects\linkages\avr\ExeStatic\ges\avr\ExeStatic\target\hpl_coreio.objC:\projects\linkages\avr\ExeStatic\target\hpl_debugprot.obj
> C:\projects\linkages\avr\ExeStatic\target\hpl_ds1602.obj
> C:\projects\linkages\avr\ExeStatic\target\hpl_eeprom.obj
> C:\projects\linkages\avr\ExeStatic\target\hpl_flash.obj
>
> C:\projects\linkages\avr\ExeStatic\target\hpl_meminit.objC:\projects\linkages\avr\ExeStatic\target\hpl_misc.obj
>
> C:\projects\linkages\avr\ExeStatic\target\hpl_power.objC:\projects\linkages\avr\ExeStatic\target\hpl_radio.obj
>
> C:\projects\linkages\avr\ExeStatic\target\hpl_radioctl.objC:\projects\linkages\avr\ExeStatic\target\hpl_reset.obj
>
> C:\projects\linkages\avr\ExeStatic\target\hpl_serial.objC:\projects\linkages\avr\ExeStatic\target\hpl_spi.obj
> C:\projects\linkages\avr\ExeStatic\target\hpl_timer.obj
>
> [snip]
>
> Is there any way to avoid this, I'd rather not have to beak it up into
> separate libraries just to get it to link
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven-native-plugin & long command lines and individual files ...

Posted by dan tran <da...@gmail.com>.
<configuration>
   <sources>
      <source/>  <!-- maps to *org.codehaus.mojo.natives.*NativeSources -->
      <source/>



On 9/26/06, Brad Harper <br...@epsiia.com> wrote:
>
> Anyone:
>
> Was this question (below) ever addressed? It didn't appear so.
>
> I looked at the source at
>
>
> http://svn.mojo.codehaus.org/browse/mojo/trunk/mojo/maven-native/maven-native-api/src/main/java/org/codehaus/mojo/natives/NativeSources.java?r=435
>
> and noted the method
>
>   public static File [] getAllSourceFilesWithExtensionTranslation(
>                                NativeSources [] sources, String extension
> ) { ... }
>
> but it isn't clear what the plugin <configuration><sources> element would
> look like.
>
> Thanks.
>
> Brad
>
> > -----Original Message-----
> > From: jmp@mobiquity.net [mailto:jmp@mobiquity.net]
> > Sent: Tuesday, August 01, 2006 1:58 AM
> > To: Maven Users List
> > Subject: maven-native-plugin & long command lines and individual files
> > ...
> >
> >
> > does the native plugin always want files specified individually?
> > AFAICT I have to do this ...
> >
> >     <source>
> >         <directory>${generated.native.source.dir}</directory>
> >         <fileNames>
> >             <fileName>devices.c</fileName>
> >             <fileName>errors.c</fileName>
> >         </fileNames>
> >         </source>
> >         <source>
> >         <directory>${basedir}/src/main/c</directory>
> >         <fileNames>
> >             <fileName>avrprog.c</fileName>
> >             <fileName>hpl_bootloader.c</fileName>
> >
> > etc etc rather than *.c
> >
> > The end result is that my final link line end up being too
> > long for the
> > Windows command processor after it has passed each file with a fully
> > qualified path name to the linker
> >
> > Error is :
> >
> > The following character string is too long:
> >  -mmcu=atmega128 -gstabs
> > -Wl,-T,C:\projects\linkages\avr\ExeStatic/src/main/conf/avr5_ext.x
> > -Wl,-Map,ExeStatic.map -Wl,--defsym=__heap_start=0x804000
> > -Wl,--defsym=__heap_end=0x80ffff-Wl,--section-start=.jumptable=0x1efe8
> > -o
> > C:\projects\linkages\avr\ExeStatic\ges\avr\ExeStatic\target\hp
> > l_coreio.objC:\projects\linkages\avr\ExeStatic\target\hpl_debu
> > gprot.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_ds1602.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_eeprom.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_flash.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_meminit.objC:\pr
> > ojects\linkages\avr\ExeStatic\target\hpl_misc.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_power.objC:\proj
> > ects\linkages\avr\ExeStatic\target\hpl_radio.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_radioctl.objC:\p
> > rojects\linkages\avr\ExeStatic\target\hpl_reset.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_serial.objC:\pro
> > jects\linkages\avr\ExeStatic\target\hpl_spi.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_timer.obj
> >
> > [snip]
> >
> > Is there any way to avoid this, I'd rather not have to beak it up into
> > separate libraries just to get it to link
> >
> > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven-native-plugin & long command lines and individual files ...

Posted by dan tran <da...@gmail.com>.
that portion of unused code has been removed

-D


On 9/26/06, Brad Harper <br...@epsiia.com> wrote:
>
> Anyone:
>
> Was this question (below) ever addressed? It didn't appear so.
>
> I looked at the source at
>
>
> http://svn.mojo.codehaus.org/browse/mojo/trunk/mojo/maven-native/maven-native-api/src/main/java/org/codehaus/mojo/natives/NativeSources.java?r=435
>
> and noted the method
>
>   public static File [] getAllSourceFilesWithExtensionTranslation(
>                                NativeSources [] sources, String extension
> ) { ... }
>
> but it isn't clear what the plugin <configuration><sources> element would
> look like.
>
> Thanks.
>
> Brad
>
> > -----Original Message-----
> > From: jmp@mobiquity.net [mailto:jmp@mobiquity.net]
> > Sent: Tuesday, August 01, 2006 1:58 AM
> > To: Maven Users List
> > Subject: maven-native-plugin & long command lines and individual files
> > ...
> >
> >
> > does the native plugin always want files specified individually?
> > AFAICT I have to do this ...
> >
> >     <source>
> >         <directory>${generated.native.source.dir}</directory>
> >         <fileNames>
> >             <fileName>devices.c</fileName>
> >             <fileName>errors.c</fileName>
> >         </fileNames>
> >         </source>
> >         <source>
> >         <directory>${basedir}/src/main/c</directory>
> >         <fileNames>
> >             <fileName>avrprog.c</fileName>
> >             <fileName>hpl_bootloader.c</fileName>
> >
> > etc etc rather than *.c
> >
> > The end result is that my final link line end up being too
> > long for the
> > Windows command processor after it has passed each file with a fully
> > qualified path name to the linker
> >
> > Error is :
> >
> > The following character string is too long:
> >  -mmcu=atmega128 -gstabs
> > -Wl,-T,C:\projects\linkages\avr\ExeStatic/src/main/conf/avr5_ext.x
> > -Wl,-Map,ExeStatic.map -Wl,--defsym=__heap_start=0x804000
> > -Wl,--defsym=__heap_end=0x80ffff-Wl,--section-start=.jumptable=0x1efe8
> > -o
> > C:\projects\linkages\avr\ExeStatic\ges\avr\ExeStatic\target\hp
> > l_coreio.objC:\projects\linkages\avr\ExeStatic\target\hpl_debu
> > gprot.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_ds1602.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_eeprom.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_flash.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_meminit.objC:\pr
> > ojects\linkages\avr\ExeStatic\target\hpl_misc.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_power.objC:\proj
> > ects\linkages\avr\ExeStatic\target\hpl_radio.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_radioctl.objC:\p
> > rojects\linkages\avr\ExeStatic\target\hpl_reset.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_serial.objC:\pro
> > jects\linkages\avr\ExeStatic\target\hpl_spi.obj
> > C:\projects\linkages\avr\ExeStatic\target\hpl_timer.obj
> >
> > [snip]
> >
> > Is there any way to avoid this, I'd rather not have to beak it up into
> > separate libraries just to get it to link
> >
> > Thanks
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>