Closed Bug 1058778 Opened 10 years ago Closed 10 years ago

mingw-w64 build fails with "nss3.def: No such file or directory"

Categories

(Firefox Build System :: General, defect)

31 Branch
x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1047267

People

(Reporter: gk, Unassigned)

References

Details

Using mingw-w64 based on GCC 4.9.1 and mingw-w64 trunk gives me:

i686-w64-mingw32-gcc -mwindows -o /home/ubuntu/build/tor-browser31/obj-mingw/security/nss/cmd/shlibsign/shlibsign.o -c -O2 -mwindows -mms-bitfields -mnop-fun-dllimport -DXP_PC -DSHLIB_SUFFIX=\"dll\" -DSHLIB_PREFIX=\"\" -UDEBUG -U_DEBUG -DNDEBUG -DWIN32 -D_WINDOWS -DWIN95 -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/include/nss -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/private/nss  shlibsign.c
i686-w64-mingw32-gcc -mwindows -o /home/ubuntu/build/tor-browser31/obj-mingw/security/nss/cmd/shlibsign/shlibsign.exe -O2 -mwindows -mms-bitfields -mnop-fun-dllimport -DXP_PC -DSHLIB_SUFFIX=\"dll\" -DSHLIB_PREFIX=\"\" -UDEBUG -U_DEBUG -DNDEBUG -DWIN32 -D_WINDOWS -DWIN95 -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/include/nss -I/home/ubuntu/build/tor-browser31/obj-mingw/dist/private/nss  /home/ubuntu/build/tor-browser31/obj-mingw/security/nss/cmd/shlibsign/shlibsign.o -specs=/home/ubuntu/build/msvcr100.spec -static-libgcc -static-libstdc++ -Wl,--enable-stdcall-fixup -Wl,--large-address-aware   nss3.def    /home/ubuntu/build/tor-browser31/obj-mingw/dist/lib/plc4.a /home/ubuntu/build/tor-browser31/obj-mingw/dist/lib/plds4.a /home/ubuntu/build/tor-browser31/obj-mingw/dist/lib/nspr4.a   
i686-w64-mingw32-gcc: error: nss3.def: No such file or directory

This happens since bug 970727 landed.

My mozconfig is:

#Specify the cross compile
export CROSS_COMPILE=1

ac_add_options --enable-application=browser
ac_add_options --target=i686-w64-mingw32
ac_add_options --enable-default-toolkit=cairo-windows
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mingw
mk_add_options MOZ_APP_DISPLAYNAME=TorBrowser
mk_add_options MOZ_MAKE_FLAGS="-j4"
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1

ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-strip
ac_add_options --enable-official-branding

ac_add_options --disable-updater
ac_add_options --disable-crashreporter
ac_add_options --disable-maintenance-service
ac_add_options --disable-webrtc
ac_add_options --disable-tests
ac_add_options --without-intl-api

And flags I set are:

HOST_LDFLAGS=" "
LDFLAGS="-specs=/path/to/spec/file"
DLLFLAGS="-specs=/path/to/spec/file"

In the .spec file "msvcrt" is replaced by "msvcr100", nothing else.
It seems like related file no longer exists on m-c. Please try to change security/build/moz.build so that this if:

if CONFIG['OS_TARGET'] == 'WINNT':
     DEFFILE = 'nss3.def'

is inside |if CONFIG['MOZ_FOLD_LIBS']:| condition.
This helps and fwiw reverting the NSS bits of bug 970727 would do it, too. I can come up with a proper patch after we switched to ESR 31 (which is supposed to happen in October).
The fix proposed in comment 1 got implemented by bug 1047267 it seems. Marking this as a duplicate then.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.