If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Build errors with VS2012 - mixing MTd libs with MDd exes fail to link

RESOLVED FIXED in seamonkey2.22

Status

SeaMonkey
Build Config
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: s793016, Assigned: mcsmurf)

Tracking

Trunk
seamonkey2.22
x86_64
Windows 7

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Created attachment 701376 [details] [diff] [review]
sm-vc11.diff

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120331 Firefox/10.0.2 SeaMonkey/2.7.2
Build ID: 20120401095132

Steps to reproduce:

Typical error:
unicharutil_external_s.lib(nsUnicharUtils.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in nsSuiteModule.obj
unicharutil_external_s.lib(nsUnicodeProperties.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in nsSuiteModule.obj
   Creating library fake.lib and object fake.exp
suite.dll : fatal error LNK1319: 2 mismatches detected


Actual results:

unicharutil_external_s.lib(nsUnicharUtils.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in nsSuiteModule.obj
unicharutil_external_s.lib(nsUnicodeProperties.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in nsSuiteModule.obj
   Creating library fake.lib and object fake.exp
suite.dll : fatal error LNK1319: 2 mismatches detected


Expected results:

no error
(Reporter)

Comment 1

5 years ago
https://bugzilla.mozilla.org/attachment.cgi?id=701376 fix this problem.

Comment 2

5 years ago
Moving to Core::BuildConfig
Component: Build Config → Build Config
Product: SeaMonkey → Core
Version: SeaMonkey 2.14 Branch → 17 Branch

Updated

5 years ago
Attachment #701376 - Attachment is patch: true
(Reporter)

Comment 3

5 years ago
Sorry, forgot include source information.

The problem source code is Seamonkey 2.14.1 release.

Comment 4

5 years ago
I ran into the same problem building trunk SM on Windows 8 using VS 2012 Express.
The path solved the error for me.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 17 Branch → Trunk

Updated

5 years ago
Attachment #701376 - Flags: review?(ted)
Jim: trunk should build with VS 2012, right? Any idea why people would be running into this issue?
Flags: needinfo?(jmathies)

Comment 6

5 years ago
We addressed this generating glue libs that link to both the static and dynamic runtime.

http://mxr.mozilla.org/mozilla-central/source/configure.in#1032

for browser:

http://mxr.mozilla.org/mozilla-central/source/browser/components/build/Makefile.in#58

Some of the cc apps probably still need a build config update to get the right runtime linked in when building with vs11.
Flags: needinfo?(jmathies)

Updated

5 years ago
Attachment #701376 - Flags: review?(ted) → review-
(Assignee)

Comment 7

5 years ago
Per Comment 6 this probably belongs into the SeaMonkey product then.
Component: Build Config → Build Config
Product: Core → SeaMonkey
(Assignee)

Updated

5 years ago
Component: Build Config → General
(Assignee)

Comment 8

5 years ago
Created attachment 736895 [details] [diff] [review]
Patch

This seems to fix the issue, need to make sure those changes are correct (I'm not that familiar with the whole "link"ing business :)
(Assignee)

Comment 9

4 years ago
--> me, will drive this forward
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Comment on attachment 736895 [details] [diff] [review]
Patch

>diff --git a/suite/build/Makefile.in b/suite/build/Makefile.in
>--- a/suite/build/Makefile.in
>+++ b/suite/build/Makefile.in
>@@ -15,6 +15,7 @@ FORCE_SHARED_LIB = 1
> IS_COMPONENT	 = 1
> MODULE_NAME	 = nsSuiteModule
> 
>+USE_STATIC_LIBS	= 1
Nit: needs an extra space to line up with the = signs above.

>diff --git a/suite/feeds/src/Makefile.in b/suite/feeds/src/Makefile.in
>--- a/suite/feeds/src/Makefile.in
>+++ b/suite/feeds/src/Makefile.in
>@@ -13,6 +13,8 @@ MODULE = suitefeeds
> LIBRARY_NAME = suitefeeds_s
> FORCE_STATIC_LIB = 1
> 
>+USE_STATIC_LIBS = 1
>+
I like this version best, so I have pointed out where all of the rest differ.

>diff --git a/suite/profile/Makefile.in b/suite/profile/Makefile.in
>--- a/suite/profile/Makefile.in
>+++ b/suite/profile/Makefile.in
>@@ -12,6 +12,7 @@ include $(DEPTH)/config/autoconf.mk
> MODULE		= suiteprofile
> LIBRARY_NAME	= suiteprofile_s
> 
>+USE_STATIC_LIBS=1
Nit: put this after FORCE_STATIC_LIB=1
Nit: spaces around = (fix both lines please)

>diff --git a/suite/profile/migration/src/Makefile.in b/suite/profile/migration/src/Makefile.in
>--- a/suite/profile/migration/src/Makefile.in
>+++ b/suite/profile/migration/src/Makefile.in
>@@ -7,6 +7,8 @@ topsrcdir	= @top_srcdir@
> srcdir		= @srcdir@
> VPATH		= @srcdir@
> 
>+USE_STATIC_LIBS = 1
Nit: put this after FORCE_STATIC_LIB = 1

>--- a/suite/shell/src/Makefile.in
>+++ b/suite/shell/src/Makefile.in
>@@ -11,7 +11,7 @@ include $(DEPTH)/config/autoconf.mk
> 
> MODULE = shellservice
> FORCE_STATIC_LIB=1
>-
>+USE_STATIC_LIBS=1
Nit: spaces around = (fix both lines please)
Nit: keep a blank line in between
Attachment #736895 - Flags: review+

Updated

4 years ago
Component: General → Build Config
Depends on: 732124
(Assignee)

Comment 11

4 years ago
Created attachment 770831 [details] [diff] [review]
Patch for checkin
Attachment #736895 - Attachment is obsolete: true
Attachment #770831 - Flags: review+
(Assignee)

Comment 12

4 years ago
Pushed: https://hg.mozilla.org/comm-central/rev/7d37ef76c40d
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.22
You need to log in before you can comment on or make changes to this bug.