logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: module machine type 'x64' conflicts with target machine type
Author
Virsacer



Joined: 16 Jan 2010
Posts: 108
Location: Germany, Darmstadt

PostPosted: Sat 16 Jan '10 22:11    Post subject: module machine type 'x64' conflicts with target machine type Reply with quote

Hi,

when I try to compile Apache I get this error:
Quote:
rc.exe /l 0x409 /fo".\Release\libapr.res" /i "./include" /d "NDEBUG" /d "APR_VERSION_ONLY" .\libapr.rc
link.exe @C:\Users\Virsacer\AppData\Local\Temp\nm82AF.tmp
.\Release\apr_atomic.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\x86_amd64\link.exe"": Rückgabe-Code "0x458"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"
Stop.


I used the official win-src (httpd-2.2.14-win32-src.zip) without any modification (Building x86 works perfectly fine)

OS is Win 7 Pro (x64 of course)
Compiler is Visual C++ Express 2008 SP1
Command: nmake /f Makefile.win installr INSTDIR=Release_TS

Where/How can I change the "target machine type" to x64?

Thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sun 24 Jan '10 17:55    Post subject: Reply with quote

I wonder how you can compile apache in x64 since the express version of VC doesn't offer the 64 bit compiler.
Back to top
Virsacer



Joined: 16 Jan 2010
Posts: 108
Location: Germany, Darmstadt

PostPosted: Mon 25 Jan '10 10:40    Post subject: Reply with quote

Well, I also have the Windows SDK 7.0 installed...

I found out that there is a "/MACHINE:" prarameter set in the makefiles.
After removing them it works.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 25 Jan '10 21:35    Post subject: Reply with quote

Can you please post the changed make file on pastebin? That would be great.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 26 Jan '10 0:56    Post subject: Reply with quote

the only place I see it is in libapr.dsp .... and it is added to this file by srclib/apr/build/cvtdsp.pl ... so that is probably the place to target it.
Back to top
Virsacer



Joined: 16 Jan 2010
Posts: 108
Location: Germany, Darmstadt

PostPosted: Tue 26 Jan '10 15:24    Post subject: Reply with quote

I used a PHP Script to remove the parameter.
There has to be a global setting when calling the other makefiles but I have not found it yet...
Code:
<?php
$files=array(
   "srclib/apr/libapr.mak",
   "srclib/apr-iconv/build/modules.mk.win",
   "srclib/apr-iconv/libapriconv.mak",
   "srclib/apr-util/dbd/apr_dbd_freetds.mak",
   "srclib/apr-util/dbd/apr_dbd_mysql.mak",
   "srclib/apr-util/dbd/apr_dbd_odbc.mak",
   "srclib/apr-util/dbd/apr_dbd_oracle.mak",
   "srclib/apr-util/dbd/apr_dbd_pgsql.mak",
   "srclib/apr-util/dbd/apr_dbd_sqlite2.mak",
   "srclib/apr-util/dbd/apr_dbd_sqlite3.mak",
   "srclib/apr-util/dbm/apr_dbm_db.mak",
   "srclib/apr-util/dbm/apr_dbm_gdbm.mak",
   "srclib/apr-util/ldap/apr_ldap.mak",
   "srclib/apr-util/libaprutil.mak",
);
foreach($files as $file){
   file_put_contents($file,str_ireplace(" /MACHINE:X86","",file_get_contents($file)));
}
?>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 26 Jan '10 17:03    Post subject: Reply with quote

Well that scripts acts a bit strange.
Error messages from the script http://pastebin.com/f1e3e423b

Also the scripts creates the non existings files (caused by file_put_contents).

See the diff http://pastebin.com/f1bfa0872

I wonder why you don't replace X86 with x64


-----
edit

I modified your php script a bit

Code:

<?php
$files=array(
   "srclib/apr/libapr.mak",
   "srclib/apr-iconv/build/modules.mk.win",
   "srclib/apr-iconv/libapriconv.mak",
   "srclib/apr-util/dbd/apr_dbd_freetds.mak",
   "srclib/apr-util/dbd/apr_dbd_mysql.mak",
   "srclib/apr-util/dbd/apr_dbd_odbc.mak",
   "srclib/apr-util/dbd/apr_dbd_oracle.mak",
   "srclib/apr-util/dbd/apr_dbd_pgsql.mak",
   "srclib/apr-util/dbd/apr_dbd_sqlite2.mak",
   "srclib/apr-util/dbd/apr_dbd_sqlite3.mak",
   "srclib/apr-util/dbm/apr_dbm_db.mak",
   "srclib/apr-util/dbm/apr_dbm_gdbm.mak",
   "srclib/apr-util/ldap/apr_ldap.mak",
   "srclib/apr-util/libaprutil.mak"
);
foreach($files as $file){
   if(file_exists($file)){
      file_put_contents($file,str_ireplace(" /MACHINE:X86","",file_get_contents($file)));
   }
}
?>
Back to top
Virsacer



Joined: 16 Jan 2010
Posts: 108
Location: Germany, Darmstadt

PostPosted: Wed 27 Jan '10 2:16    Post subject: Reply with quote

James Blond wrote:
Well that scripts acts a bit strange.
Error messages from the script http://pastebin.com/f1e3e423b
Hm, why do you not have the .mak files?
They are in the official source-zip...
...and they are used when compiling!?

James Blond wrote:
I wonder why you don't replace X86 with x64
In case I want to build for x86 I would have to replace them again...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 27 Jan '10 11:32    Post subject: Reply with quote

Virsacer wrote:
Hm, why do you not have the .mak files?
They are in the official source-zip...
...and they are used when compiling!?


Well I use the unix source code. Maybe that's why it is different. I give it a try with the windows source code Laughing
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 28 Jan '10 0:47    Post subject: Reply with quote

Yepp it works with the win32 source. Now I want to figure out how to do that with the unix source.
Back to top


Reply to topic   Topic: module machine type 'x64' conflicts with target machine type View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads