You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bruno Mahé (JIRA)" <ji...@apache.org> on 2010/09/18 00:06:33 UTC

[jira] Created: (DAEMON-174) unix makefile should pass CFLAGS to link command

unix makefile should pass CFLAGS to link command
------------------------------------------------

                 Key: DAEMON-174
                 URL: https://issues.apache.org/jira/browse/DAEMON-174
             Project: Commons Daemon
          Issue Type: Bug
            Reporter: Bruno Mahé
            Priority: Minor


I am trying to compile a 32bit version of jsvc from a 64bit host and got some issues at link time because CFLAGS (and therefore -m32) does not get passed to the link command.

Here is some output:
gcc  jsvc-unix.o libservice.a -ldl -lpthread -o ../jsvc
/usr/bin/ld: i386 architecture of input file `jsvc-unix.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(arguments.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(debug.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(help.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(home.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(java.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(location.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(replace.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libservice.a(dso-dlfcn.o)' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
make[1]: *** [jsvc] Error 1


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DAEMON-174) unix makefile should pass CFLAGS to link command

Posted by "Mladen Turk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mladen Turk closed DAEMON-174.
------------------------------

    Resolution: Won't Fix

See the INSTALL.txt

As for making 66-bit binaries you will need:
export CFLAGS=-m32
export LDFLAGS=-m32
./configure
make

In essence any linker command must be present in LDFLAGS, not CFLAGS


> unix makefile should pass CFLAGS to link command
> ------------------------------------------------
>
>                 Key: DAEMON-174
>                 URL: https://issues.apache.org/jira/browse/DAEMON-174
>             Project: Commons Daemon
>          Issue Type: Bug
>            Reporter: Bruno Mahé
>            Priority: Minor
>         Attachments: commons-daemon-native-build.patch
>
>
> I am trying to compile a 32bit version of jsvc from a 64bit host and got some issues at link time because CFLAGS (and therefore -m32) does not get passed to the link command.
> Here is some output:
> gcc  jsvc-unix.o libservice.a -ldl -lpthread -o ../jsvc
> /usr/bin/ld: i386 architecture of input file `jsvc-unix.o' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(arguments.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(debug.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(help.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(home.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(java.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(location.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(replace.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(dso-dlfcn.o)' is incompatible with i386:x86-64 output
> collect2: ld returned 1 exit status
> make[1]: *** [jsvc] Error 1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (DAEMON-174) unix makefile should pass CFLAGS to link command

Posted by "Mladen Turk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910897#action_12910897 ] 

Mladen Turk edited comment on DAEMON-174 at 9/18/10 1:39 AM:
-------------------------------------------------------------

See the INSTALL.txt

As for making 64-bit binaries you will need:
export CFLAGS=-m32
export LDFLAGS=-m32
./configure
make

In essence any linker command must be present in LDFLAGS, not CFLAGS


      was (Author: mturk@apache.org):
    See the INSTALL.txt

As for making 66-bit binaries you will need:
export CFLAGS=-m32
export LDFLAGS=-m32
./configure
make

In essence any linker command must be present in LDFLAGS, not CFLAGS

  
> unix makefile should pass CFLAGS to link command
> ------------------------------------------------
>
>                 Key: DAEMON-174
>                 URL: https://issues.apache.org/jira/browse/DAEMON-174
>             Project: Commons Daemon
>          Issue Type: Bug
>            Reporter: Bruno Mahé
>            Priority: Minor
>         Attachments: commons-daemon-native-build.patch
>
>
> I am trying to compile a 32bit version of jsvc from a 64bit host and got some issues at link time because CFLAGS (and therefore -m32) does not get passed to the link command.
> Here is some output:
> gcc  jsvc-unix.o libservice.a -ldl -lpthread -o ../jsvc
> /usr/bin/ld: i386 architecture of input file `jsvc-unix.o' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(arguments.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(debug.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(help.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(home.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(java.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(location.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(replace.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(dso-dlfcn.o)' is incompatible with i386:x86-64 output
> collect2: ld returned 1 exit status
> make[1]: *** [jsvc] Error 1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DAEMON-174) unix makefile should pass CFLAGS to link command

Posted by "Bruno Mahé (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruno Mahé updated DAEMON-174:
------------------------------

    Attachment: commons-daemon-native-build.patch

Here is a patch to fix this issue.

It has been locally tested.

> unix makefile should pass CFLAGS to link command
> ------------------------------------------------
>
>                 Key: DAEMON-174
>                 URL: https://issues.apache.org/jira/browse/DAEMON-174
>             Project: Commons Daemon
>          Issue Type: Bug
>            Reporter: Bruno Mahé
>            Priority: Minor
>         Attachments: commons-daemon-native-build.patch
>
>
> I am trying to compile a 32bit version of jsvc from a 64bit host and got some issues at link time because CFLAGS (and therefore -m32) does not get passed to the link command.
> Here is some output:
> gcc  jsvc-unix.o libservice.a -ldl -lpthread -o ../jsvc
> /usr/bin/ld: i386 architecture of input file `jsvc-unix.o' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(arguments.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(debug.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(help.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(home.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(java.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(location.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(replace.o)' is incompatible with i386:x86-64 output
> /usr/bin/ld: i386 architecture of input file `libservice.a(dso-dlfcn.o)' is incompatible with i386:x86-64 output
> collect2: ld returned 1 exit status
> make[1]: *** [jsvc] Error 1

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.