MSVS 2017, LNK1112 module machine type 'x64' conflic

Discuss issues related to installing or building
CandL
Posts: 49
Joined: Mon Oct 14 2019 6:37 pm

MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by CandL »

Anybody else trying MSVS 2017 or 2019? Copperspice 1.6 as pulled from github.

I need 64 bit builds, and this error seems pretty common. Limiting the build to cscore I get:

Code: Select all

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1112	module machine type 'x64' conflicts with target machine type 'x86'	CsCore	C:\Users\210008258\github\copperspice\release\src\core\x64\Release\qabstractanimation.obj	1	
just asking before I dig into cmake to find out what is going on.
CandL
Posts: 49
Joined: Mon Oct 14 2019 6:37 pm

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by CandL »

Probably ought to point out I use MSVC compilers / linkers from the command line, not the IDE (I get lost in there)

This is an IDE build per the instructions
barbara
Posts: 446
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by barbara »

CandL wrote: Fri Oct 25 2019 3:51 pm Anybody else trying MSVS 2017 or 2019? Copperspice 1.6 as pulled from github.
As I have mentioned, our CI for MSVC CopperSpice builds from master on github with no errors. The CMake files can always be improved but they work so I would not concentrate on this be your issue. It would be better to focus your attention on how your build set up might be misconfigured.
LNK1112 module machine type 'x64' conflicts with target machine type 'x86'
Reading this error message shows indicate you are trying to link object files, some of which are 64 bit and others which are 32-bit. So this is not a CopperSpice issue, but rather a configuration problem somewhere on your system.

I did a quick google search and this turns out to be a common problem. Maybe some of those hits could help you work this out. You may want to start by looking at the object files to determine which ones are being build for the wrong architecture.

Please let us know what you find.

Barbara
CandL
Posts: 49
Joined: Mon Oct 14 2019 6:37 pm

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by CandL »

Yup understood the error message but as you suggested ... followed the guideline :D

Notice I asked about 64 bit builds... have you only release 32 MSVS builds?

This is all being driven by the CMake setup, I have made no tweaks. Just imported it into MSVS, selected 64 bit, and hit build.
barbara
Posts: 446
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by barbara »

...followed the guideline
Our published CS Overview documentation for Windows only covers building with MinGW from a a Bash prompt or from MSVC through the IDE. However we have tested in CI to build for 32-bit and 64-bit and there are no current blockers.

We currently do not have a prebuilt binary for MSVC. There are prebuilt 64-bit nuget packages for CS 1.5.3 available.

Now that we have modernized the CMake files, we will be releasing 64-bit binary with the next update. This is scheduled for sometime in November 2019.
I use MSVC compilers / linkers from the command line, not the IDE (I get lost in there)
Since you are seeing a 64-bit / 32-bit incompatibility error and the CopperSpice team is not seeing this, most likely there is some set up mismatch on your end. You mentioned a few posts ago that you are not using the IDE, this might be the difference. Our documentation does not yet cover building with MSVC from a command prompt. I know this can be frustrating and it will take a bit of work. You may want to check out a few google searches to see what other developers have found for this error.

Barbara
barbara
Posts: 446
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by barbara »

Quick note, our office is located in Northern California and we are currently experiencing wild fires and forced power outages. It is expected our entire area will lose power due to a planned black out. This is in effect from October 26 through October 28. A bit frustrating however it is a small price to pay for avoiding fire damage.

Thank you for your patience over the next few days.

Barbara & Ansel
Co-Founders of CopperSpice
CandL
Posts: 49
Joined: Mon Oct 14 2019 6:37 pm

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by CandL »

Pack up and get out NOW!

Simple and straight forward ... California is in our prayers.
ansel
Posts: 152
Joined: Fri Apr 10 2015 8:23 am

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by ansel »

You said you are using everything from a command prompt, but you also mention MSVS. I'm not sure exactly what you are doing to configure the project here. Your error message indicates a 32/64-bit mismatch between compiling and linking. This is typically caused by a configuration problem.

Since you said you are not using the MSVC IDE, you will need to configure your build system manually to specify both a 64-bit compile and a 64-bit link. If you have a config file of some kind, let us know what it contains. If you are passing arguments to CMake on the command line directly, what options are you using? How are you configuring CMake for a 64-bit build?
Ansel Sermersheim
CopperSpice Cofounder
CandL
Posts: 49
Joined: Mon Oct 14 2019 6:37 pm

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by CandL »

I originally started out using the command line, as I have more control and experience there. But then Barbra said to follow the instructions which involved the IDE so that is where the error was coming from. When the teacher says color inside the lines you color inside the lines ;)

Now this work was with MSVS 2017 IDE, so I went rogue again ... and did it via the command line and a lot of copperspice built, but I am missing the creation of the cscore.dll ... I need to out what it did not like.

On the other hand I brought it home and tried to build it using MSVS 2019 IDE ... There I just opened the CMakelists.txt doc and basically said build (MSVS 2019 likes CMake/Ninja now) ... problem was the build crushed my machine ~5 times .. 100% CPU, 100% Mem, 100% disk. The home machine is a core I7 with only 8 Gb memory, hence the issue. So I need to do a command line build and limit the number of jobs Ninja will run.

Have you considered compiler special interest groups? I would play in the MSVS and Clang ones :)

So I have not given up, still trudging along.

Glad you guys are safe.....
barbara
Posts: 446
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: MSVS 2017, LNK1112 module machine type 'x64' conflic

Post by barbara »

When the teacher says color inside the lines you color inside the lines
That was funny and as others who know me can assure you I have a wicked sense of humor.
Glad you guys are safe.....
Yep, we are totally fine. To some it may have sounded odd, but our concern was ensuring every computer and the entire CI systems were brought down nicely. We have everything on a UPS which has been tested so this would have worked, just felt better to take them off line an hour before power was cut.
So I have not given up, still trudging along
Glad to hear you are still testing. Please keep in mind that CopperSpice builds and links on our internal CI system, several other known systems, and Azure ( which will be added to github shortly ). So our aim is simply to figure out what configuration setup you have which is different.

(1) Going back to take this from the top. Your reported problem is a linking issue which is saying there is a 32-bit / 64-bi conflict.

(2) Please delete the object file which is reporting the error.

Code: Select all

...x64\Release\qabstractanimation.obj
We want to see if this is regenerated as a 64-bit file. If so, then you have stale files which were generated in a prior build when it seems you had requested a 32-bit build.

Barbara
Post Reply