Page 1 of 1
configure.cpp in 6.6.3-9 creates solution for AMD machines
Posted: 2010-08-29T10:06:33-07:00
by el_supremo
Line 4871 in VisualMagick\configure\configure.cpp in the current windows source code distribution forces the solution file to create code for AMD machines.
Code: Select all
m_stream << " AdditionalDependencies=\"/MACHINE:AMD64 ";
Previous versions always defaulted to Intel machines and this line was:
Code: Select all
m_stream << " AdditionalDependencies=\"";
Pete
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2010-08-29T10:18:57-07:00
by magick
We're aware but have not come up with a solution yet other than manually removing /MACHINE:AMD64. Note, the precompiled configure.exe executable does not include the /MACHINE:AMD64 option.
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2010-09-12T21:53:48-07:00
by rmabry
This just bit me in 6.4.4-1 and 'twas only Pete's post that helped me fix this. I was getting the ubiquitous error,
"fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'"
on all the links in the build. I'm building on a WIN32 machine, so this made no sense.
Magick, you make it sound as if the file configure.cpp is not under the control of ImageMagick. Why is the AMD64 stuff suddenly present? I realize that there are many 64-bit users, but what about us old 32-bitters? Shouldn't this at least be be an option at configure time?
Rick
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2010-09-13T04:24:49-07:00
by magick
Yes it should be an option. We're a victim of too much to do, too little time. As always, keep in mind that ImageMagick is open source. Anyone can submit a fix for this problem-- or you can wait until we can around to fixing it.
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2010-09-13T05:47:55-07:00
by rmabry
We're a victim of too much to do, too little time. As always, keep in mind that ImageMagick is open source.
I know it well, I'm just trying to understand how I should be handling the situation and what it means.
Anyone can submit a fix for this problem-- or you can wait until we can get around to fixing it.
Well, not anyone can do it.
For example, you don't to a 32-bit solution for a 64-bit problem, else I'd say the fix is to revert to the previous.
At the risk of not understanding the answer, I'll repeat this part:
Why is the AMD64 stuff suddenly present?
That's for anyone to answer, just for my own enlightenment. I just might be 64-bit someday.
Rick
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2010-09-13T05:57:00-07:00
by magick
- Why is the AMD64 stuff suddenly present?
64-bit is now the default build. Most new Windows computers come with 64-bit Windows 7. Enterprise users are still at 32-bit but we provide a 32-bit binary and enterprise users should be sophisticated enough to build ImageMagick from source.
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2012-11-23T23:02:09-07:00
by rmabry
I'm not sophisticated, but I did leave unchecked the "Build 64-bit distro" box when I executed configure.exe. I then built a 32bit version (Release Win32) of IM 6.8.0-5. So why would I then get this error?
fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
Code: Select all
C:\ImageMagick\PerlMagick>nmake install
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -I.. -I..\xlib\include -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL
-fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS
-DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_
PERLIO -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DVERSION=\"6.80\" -DXS_VERSION=\"6.80\" "-IC:\Perl64\lib\CORE"
-D_VISUALC_ -D_WINDOWS Magick.c
Magick.c
MagickCore lib DLL import interface
MagickCore module DLL export interface
Running Mkbootstrap for Image::Magick ()
C:\Perl64\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 Magick.bs
C:\Perl64\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"
Image::Magick\", 'DLBASE' => 'Magick', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
link -out:blib\arch\auto\Image\Magick\Magick.dll -dll -nologo -nodefault
lib -debug -opt:ref,icf -ltcg -libpath:"C:\Perl64\lib\CORE" -machine:AMD64 Magick.obj
C:\Perl64\lib\CORE\perl514.lib C:\ImageMagick\VisualMagick\lib\CORE_RL_magick_.lib
-def:Magick.def
Magick.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\link.EXE"' : return code '0x458'
Stop.
I don't understand this. What's telling the install that anything is 64-bit if I have explicitly clicked otherwise?
[Added in edit: By the way, in order for
nmake install to succeed, I first execute (as always)
vcvars32.bat, which is easiest if its direectory is in the PATH environmental variable; in my case the path is
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin.]
Rick
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2012-11-24T07:02:57-07:00
by magick
Looks like you're building with the x64 version of Perl. Try the x86 version.
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2012-11-24T09:55:39-07:00
by rmabry
magick wrote:Looks like your building with the x64 version of Perl. Try the x86 version.
Ha, thanks! Good grief, I even looked at that. Both versions of Perl are on the system and PATH had the 32-bit first in the list... weird.
But no matter --- the 64-bit Perl stuff is now gone from my PATH. Now I might be closer, as I'm getting similar errors to what I got last night when I brazenly deleted 64-bit options in the generated Makefile.
Here's the new state of trouble (after downloading the latest 32-bit ActiveState):
After
nmake clean, I tried to rebuild, ultimately getting a bunch of unresolved external symbol errors:
Code: Select all
C:\ImageMagick\PerlMagick>perl Makefile.nt
Checking if your kit is complete...
Looks good
Warning: '-L../VisualMagick/lib' changed to '-LC:/ImageMagick/PerlMagick/../Visu
alMagick/lib'
Warning: '-L../VisualMagick/bin' changed to '-LC:/ImageMagick/PerlMagick/../Visu
alMagick/bin'
Note (probably harmless): No library found for -lCORE_DB_magick_.lib
Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for ws2_32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for comctl32.lib
Note (probably harmless): No library found for msvcrt.lib
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
I'm never sure how (probably) harmless I should consider the above, but forging ahead,
Code: Select all
C:\ImageMagick\PerlMagick>vcvars32
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
C:\ImageMagick\PerlMagick>nmake install
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -I.. -I..\xlib\include -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWI
N32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IM
PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -MD -Zi -DND
EBUG -O1 -DVERSION=\"6.80\" -DXS_VERSION=\"6.80\" "-IC:\Perl\lib\CORE" -D_
VISUALC_ -D_WINDOWS Magick.c
Magick.c
MagickCore lib DLL import interface
MagickCore module DLL export interface
Running Mkbootstrap for Image::Magick ()
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Magick.bs
C:\Perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"Im
age::Magick\", 'DLBASE' => 'Magick', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPO
RTS' => { }, 'DL_VARS' => []);"
link -out:blib\arch\auto\Image\Magick\Magick.dll -dll -nologo -nodefault
lib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 Magick.obj
C:\Perl\lib\CORE\perl516.lib C:\ImageMagick\VisualMagick\lib\CORE_RL_magick_.lib
-def:Magick.def
Creating library blib\arch\auto\Image\Magick\Magick.lib and object blib\arch\
auto\Image\Magick\Magick.exp
Magick.obj : error LNK2001: unresolved external symbol __fltused
Magick.obj : error LNK2019: unresolved external symbol __ftol2 referenced in fun
ction _ClampToQuantum
Magick.obj : error LNK2019: unresolved external symbol _strcmp referenced in fun
ction _constant
Magick.obj : error LNK2019: unresolved external symbol __imp___errno referenced
in function _constant
Magick.obj : error LNK2019: unresolved external symbol __imp__fprintf referenced
in function _GetList
Magick.obj : error LNK2019: unresolved external symbol ___security_cookie refere
nced in function _GetPackageInfo
Magick.obj : error LNK2019: unresolved external symbol @__security_check_cookie@
4 referenced in function _GetPackageInfo
Magick.obj : error LNK2019: unresolved external symbol __chkstk referenced in fu
nction _GetPackageInfo
Magick.obj : error LNK2019: unresolved external symbol __imp__strtol referenced
in function _StringToLong
Magick.obj : error LNK2019: unresolved external symbol __imp__strrchr referenced
in function _XS_Image__Magick_Average
Magick.obj : error LNK2019: unresolved external symbol _strlen referenced in fun
ction _XS_Image__Magick_DESTROY
Magick.obj : error LNK2019: unresolved external symbol __imp__sscanf referenced
in function _XS_Image__Magick_Get
Magick.obj : error LNK2019: unresolved external symbol __ftol2_sse referenced in
function _XS_Image__Magick_Get
Magick.obj : error LNK2019: unresolved external symbol __imp__ceil referenced in
function _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol _sqrt referenced in funct
ion _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol __imp__strchr referenced
in function _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol _sin referenced in functi
on _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol _cos referenced in functi
on _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol _tan referenced in functi
on _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol _fmod referenced in funct
ion _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol _fabs referenced in funct
ion _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol _memset referenced in fun
ction _XS_Image__Magick_Mogrify
Magick.obj : error LNK2019: unresolved external symbol __imp__floor referenced i
n function _XS_Image__Magick_QueryColor
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
blib\arch\auto\Image\Magick\Magick.dll : fatal error LNK1120: 24 unresolved exte
rnals
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\link.EXE"' : return code '0x460'
Stop.
Any thoughts? Some libraries aren't being reached? That seems odd, since the overall IM build succeeds.
Thanks,
Rick
Re: configure.cpp in 6.6.3-9 creates solution for AMD machin
Posted: 2012-12-01T10:26:35-07:00
by rmabry
In case it offers further clues, here are what I think are the relevant environmental variables that are set (after running
vcvars32.bat):
Code: Select all
INCLUDE=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include;
LIB=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;c:\Program Files(x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib;
LIBPATH=c:\Windows\Microsoft.NET\Framework\v4.0.30319;c:\Windows\Microsoft.NET\Framework\v3.5;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;
MAGICK_HOME=C:\ImageMagick\VisualMagick\bin
What gives? The main IM builds fine. What worked for me just a few years ago does not.
Rick