We are migrating our builds from maven1 to maven2 and therefore migrating to
the 2.0 nar plugin. One issue we are running into is that the build is on a
64bit machine but we need to build using -m32. With the m1 plugin this works
fine by specifying the following properties

i386.Linux.gcc.freehep.nar.linker.arg.mid=-m32

We've tried to do a similar thing w/ the m2 plugin by adding in linker
options of

<linker>
<name>g++</name>
<options>
<option>-m32</option>
</options>
</linker>

this passes the correct -m32 flag to ld but then fails on the ar step with
the following error

[INFO] Linking...
[ERROR] /usr/bin/ar: illegal option -- 3
[ERROR] Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV]
[member-name] [count] archive-file file...
[ERROR] /usr/bin/ar -M [<mri-script]
[ERROR] commands:
[ERROR] d - delete file(s) from the archive
[ERROR] m[ab] - move file(s) in the archive
[ERROR] p - print file(s) found in the archive
[ERROR] q[f] - quick append file(s) to the archive
[ERROR] r[ab][f][u] - replace existing or insert new file(s) into the
archive
[ERROR] t - display contents of archive
[ERROR] x[o] - extract file(s) from the archive
[ERROR] command specific modifiers:
[ERROR] [a] - put file(s) after [member-name]
[ERROR] [b] - put file(s) before [member-name] (same as [i])
[ERROR] [N] - use instance [count] of name
[ERROR] [f] - truncate inserted file names
[ERROR] [P] - use full path names when matching
[ERROR] [o] - preserve original dates
[ERROR] [u] - only replace files that are newer than current archive
contents
[ERROR] generic modifiers:
[ERROR] [c] - do not warn if the library had to be created
[ERROR] [s] - create an archive index (cf. ranlib)
[ERROR] [S] - do not build a symbol table
[ERROR] [v] - be verbose
[ERROR] [V] - display the version number
[ERROR] @<file> - read options from <file>
[ERROR] emulation options:
[ERROR] No emulation specific options
[ERROR] /usr/bin/ar: supported targets: elf64-x86-64 elf32-i386
a.out-i386-linux efi-app-ia32 elf64-little elf64-big elf32-little elf32-big
srec symbolsrec tekhex binary ihex


It looks like the -m32 option is being passed to ld (which is good) then to
ar (which can not use it).

Anyone have a suggestion on what the correct configuration is w/ the m2
plugin?

Thanks,
Mark
-- 
View this message in context: 
http://n2.nabble.com/Nar-Plugin-Linking-Problems-%28compile-32bit-code-on-64bit-machine%29-tp1109381p1109381.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to