Last Comment Bug 389411 - Mingw build error - undefined reference to `_imp__PKIX_ERRORNAMES'
: Mingw build error - undefined reference to `_imp__PKIX_ERRORNAMES'
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Build (show other bugs)
: trunk
: x86 Windows XP
: P1 normal (vote)
: 3.12
Assigned To: Alexei Volkov
:
:
Mentors:
Depends on:
Blocks: 388403
  Show dependency treegraph
 
Reported: 2007-07-24 09:18 PDT by Martijn Wargers [:mwargers] (not working for Mozilla)
Modified: 2007-09-26 13:36 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
ckcapi.h (7.38 KB, text/plain)
2007-07-25 15:46 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
no flags Details
fixes all kinds of build errors (9.48 KB, patch)
2007-07-26 04:46 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
no flags Details | Diff | Splinter Review
workaround path (1.79 KB, patch)
2007-07-29 15:25 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
no flags Details | Diff | Splinter Review
fix pkix_tools.h (906 bytes, patch)
2007-09-09 18:08 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
alvolkov.bgs: review-
Details | Diff | Splinter Review
do not import error strings from library (1.16 KB, patch)
2007-09-12 10:08 PDT, Alexei Volkov
rrelyea: superreview+
Details | Diff | Splinter Review

Description Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-24 09:18:20 PDT
After I tried to circumvent the build error from bug 389392, by checking out with a date prior to the patch causing that, I got this build error:

kix_pl_httpdefaultclient.o c:/mozilla/mozilla/nss/pkixmodule/pkix_pl_ldaptemplat
es.o c:/mozilla/mozilla/nss/pkixmodule/pkix_pl_ldapcertstore.o c:/mozilla/mozill
a/nss/pkixmodule/pkix_pl_ldapresponse.o c:/mozilla/mozilla/nss/pkixmodule/pkix_p
l_ldaprequest.o c:/mozilla/mozilla/nss/pkixmodule/pkix_pl_ldapdefaultclient.o c:
/mozilla/mozilla/nss/pkixmodule/pkix_pl_nsscontext.o c:/mozilla/mozilla/nss/pkix
module/pkix_pl_pk11certstore.o c:/mozilla/mozilla/nss/pkixmodule/pkix_pl_socket.
o  -Lc:/mozilla/mozilla/dist/lib -lsoftokn3 -Lc:/mozilla/mozilla/dist/lib -lplc4
 -lplds4 -lnspr4    c:/mozilla/mozilla/nss/nss/nss.res
Creating library file: c:/mozilla/mozilla/nss/nss/libnss3.a
c:/mozilla/mozilla/nss/pkixutil/pkix_error.o: In function `pkix_Error_ToString':
c:/mozilla/mozilla/security/nss/lib/libpkix/pkix/util/pkix_error.c:311: undefine
d reference to `_imp__PKIX_ERRORNAMES'
c:/mozilla/mozilla/nss/pkixutil/pkix_logger.o: In function `pkix_Logger_ToString
':c:/mozilla/mozilla/security/nss/lib/libpkix/pkix/util/pkix_logger.c:372: undef
ined reference to `_imp__PKIX_ERRORNAMES'
collect2: ld returned 1 exit status
make[6]: *** [c:/mozilla/mozilla/nss/nss/nss3.dll] Error 1
make[6]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib/nss'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/manager'
make[3]: *** [libs_tier_toolkit] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[2]: *** [tier_toolkit] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make: *** [alldep] Error 2

I suspect this might have something to do with bug 388403.
Can that be the cause of my build error.
Comment 1 Julien Pierre 2007-07-24 17:20:19 PDT
What compiler are you using ? We only test with with some versions of MSVC on Windows. It appears you are using something else.
Comment 2 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-24 17:22:32 PDT
gcc compiler.
Comment 3 Julien Pierre 2007-07-24 17:31:02 PDT
Here is the issue, in pkix_tools.h :

/*
 * PKIX_ERRORNAMES is an array of strings, with each string holding a
 * descriptive name for an error code. This is used by the default
 * PKIX_PL_Error_ToString function.
 */
#ifdef _WIN32
extern __declspec(dllimport) const char *PKIX_ERRORNAMES[PKIX_NUMERRORS];
#else
extern const char *PKIX_ERRORNAMES[PKIX_NUMERRORS];
#endif

There should be a macro used instead of the declspec stuff, which is specific to the MS compiler. Try to just use the variant in the else statement to get past the build error for now.
Comment 4 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-25 06:41:51 PDT
Thanks, that seemed to help, I used #ifdef _MSC_VER instead.

I now get this build error:
/cygdrive/c/mozilla/mozilla/build/cygwin-wrapper gcc -mno-cygwin -o c:/mozilla/m
ozilla/nss/nsscapi/anchor.o -c -g -mno-cygwin -mms-bitfields -mnop-fun-dllimport
 -DXP_PC -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_mw -DWIN32 -D_WINDOWS -D_X86_ -DWIN95
 -DNSS_ENABLE_ECC -Ic:/mozilla/mozilla/dist/include/nspr -Ic:/mozilla/mozilla/di
st/include  -Ic:/mozilla/mozilla/dist/public/nss -Ic:/mozilla/mozilla/dist/priva
te/nss -Ic:/mozilla/mozilla/dist/include  -Ic:/mozilla/mozilla/dist/public/nspr
 anchor.c
In file included from anchor.c:51:
ckcapi.h:103: error: syntax error before "CRYPT_KEY_PROV_INFO"
ckcapi.h:103: warning: no semicolon at end of struct or union
ckcapi.h:108: error: syntax error before '}' token
ckcapi.h:145: error: field `key' has incomplete type
make[7]: *** [c:/mozilla/mozilla/nss/nsscapi/anchor.o] Error 1
make[7]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib/ckfw/ca
pi'
make[6]: *** [libs] Error 2
make[6]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib/ckfw'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/manager'
make[3]: *** [libs_tier_toolkit] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[2]: *** [tier_toolkit] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make: *** [alldep] Error 2
Comment 5 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-25 15:30:34 PDT
Julien (or anybody else?) ping?
Any way to get my build to succesfully complete again?
Comment 6 Julien Pierre 2007-07-25 15:43:01 PDT
Martijn,

Look in your ckcapi.h and see what could be wrong . Your machine may have a different version of that system header file so it is best for you to look into it. It's probably another define issue.
Comment 7 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-25 15:46:25 PDT
Created attachment 273865 [details]
ckcapi.h

This is my ckcapi.h file. There doesn't seem to be anything wrong with it, afaict.
Comment 8 Julien Pierre 2007-07-25 15:58:11 PDT
Sorry, I meant for you to look into the Windows system file that defines CRYPT_KEY_PROV_INFO . Apparently you are missing it somehow because you have the wrong OS macro defined.
Comment 9 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-25 16:50:01 PDT
Ok, thanks, it seems like there isn't a file in mingw that defines CRYPT_KEY_PROV_INFO. 
Comment 10 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-25 18:06:32 PDT
So adding that fixes that build erorr, but then I'm leaping in yet another build error.
Is there some way to just the nss part of the tree? I now have to rebuild the complete tree everytime and that's very time consuming.
Comment 11 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-26 04:46:15 PDT
Created attachment 273959 [details] [diff] [review]
fixes all kinds of build errors

This fixes all kinds of build errors I got.

But I keep running into build errors. I'm now running into this build error:
ic/nspr -o c:/mozilla/mozilla/nss/nsscapi/nsscapi.res nsscapi.rc
c:/mozilla/mozilla/nss/nsscapi/nsscapi.res finished
cp nsscapi.def c:/mozilla/mozilla/nss/nsscapi/nsscapi.def
rm -f c:/mozilla/mozilla/nss/nsscapi/nsscapi.dll
/cygdrive/c/mozilla/mozilla/build/cygwin-wrapper gcc -mno-cygwin  -mno-cygwin -o
 c:/mozilla/mozilla/nss/nsscapi/nsscapi.dll -shared -Wl,--export-all-symbols  c:
/mozilla/mozilla/nss/nsscapi/anchor.o c:/mozilla/mozilla/nss/nsscapi/constants.o
 c:/mozilla/mozilla/nss/nsscapi/cfind.o c:/mozilla/mozilla/nss/nsscapi/cinst.o c
:/mozilla/mozilla/nss/nsscapi/cobject.o c:/mozilla/mozilla/nss/nsscapi/crsa.o c:
/mozilla/mozilla/nss/nsscapi/csession.o c:/mozilla/mozilla/nss/nsscapi/cslot.o c
:/mozilla/mozilla/nss/nsscapi/ctoken.o c:/mozilla/mozilla/nss/nsscapi/ckcapiver.
o c:/mozilla/mozilla/nss/nsscapi/staticobj.o  c:/mozilla/mozilla/dist/lib/libnss
ckfw.a c:/mozilla/mozilla/dist/lib/libnssb.a  -Lc:/mozilla/mozilla/dist/lib -lpl
c4 -lplds4 -lnspr4     c:/mozilla/mozilla/nss/nsscapi/nsscapi.res
c:/mozilla/mozilla/nss/nsscapi/cfind.o: In function `collect_bare':c:/mozilla/mo
zilla/security/nss/lib/ckfw/capi/cfind.c:323: undefined reference to `CryptEnumK
eyIdentifierProperties'
c:/mozilla/mozilla/nss/nsscapi/cfind.o: In function `collect_class':c:/mozilla/m
ozilla/security/nss/lib/ckfw/capi/cfind.c:353: undefined reference to `CertOpenS
ystemStoreA@8'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cfind.c:360: undefined reference
to `CertEnumCertificatesInStore@8'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cfind.c:368: undefined reference
to `CertGetCertificateContextProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cfind.c:373: undefined reference
to `_HRESULT_TYPEDEF_'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cfind.c:380: undefined reference
to `CertGetCertificateContextProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cfind.c:394: undefined reference
to `_HRESULT_TYPEDEF_'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cfind.c:418: undefined reference
to `CertDuplicateCertificateContext@4'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cfind.c:431: undefined reference
to `CertCloseStore@8'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `nss_ckcapi_FetchKeyContai
ner':c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:602: undefined refe
rence to `CryptAcquireCertificatePrivateKey'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_FetchLabel':c:/moz
illa/mozilla/security/nss/lib/ckfw/capi/cobject.c:868: undefined reference to `C
ertGetCertificateContextProperty'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_FetchSerial':c:/mo
zilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:906: undefined reference to `
CryptEncodeObject'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_FetchID':c:/mozill
a/mozilla/security/nss/lib/ckfw/capi/cobject.c:931: undefined reference to `Cert
GetCertificateContextProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:941: undefined referenc
e to `CertGetCertificateContextProperty'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_cert_hasEmail':c:/
mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1342: undefined reference t
o `CertGetNameStringA@24'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_cert_isRoot':c:/mo
zilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1354: undefined reference to
`CertCompareCertificateName'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_cert_isCA':c:/mozi
lla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1369: undefined reference to `C
ertFindExtension@12'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1375: undefined referen
ce to `CryptDecodeObject@28'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_cert_getPrivateKey
Info':c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1399: undefined re
ference to `CryptGetKeyIdentifierProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1410: undefined referen
ce to `CryptGetKeyIdentifierProperty'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_cert_getProvInfo':
c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1432: undefined referenc
e to `CertGetCertificateContextProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1443: undefined referen
ce to `CertGetCertificateContextProperty'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_mdObject_Destroy':
c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1505: undefined referenc
e to `CertOpenSystemStoreA@8'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1510: undefined referen
ce to `CertFindCertificateInStore@24'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1516: undefined referen
ce to `CertDeleteCertificateFromStore@4'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1517: undefined referen
ce to `CertFreeCertificateContext@4'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1544: undefined referen
ce to `CryptSetKeyIdentifierProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1556: undefined referen
ce to `CertCloseStore@8'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `nss_ckcapi_DestroyInterna
lObject':c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1846: undefined
 reference to `CertFreeCertificateContext@4'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `nss_ckcapi_CreateCertific
ate':c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1912: undefined ref
erence to `CertCreateCertificateContext'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1926: undefined referen
ce to `CertSetCertificateContextProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1937: undefined referen
ce to `CertSetCertificateContextProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1973: undefined referen
ce to `CertSetCertificateContextProperty'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1983: undefined referen
ce to `CertOpenSystemStoreA@8'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1990: undefined referen
ce to `CertAddCertificateContextToStore@16'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1992: undefined referen
ce to `CertFreeCertificateContext@4'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:1994: undefined referen
ce to `CertCloseStore@8'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2015: undefined referen
ce to `CertFreeCertificateContext@4'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2019: undefined referen
ce to `CertFreeCertificateContext@4'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2023: undefined referen
ce to `CertCloseStore@8'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_getDefaultProvider
':c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2039: undefined refere
nce to `CryptGetDefaultProvider'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2049: undefined referen
ce to `CryptGetDefaultProvider'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `ckcapi_getContainer':c:/m
ozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2071: undefined reference to
 `UuidCreate@4'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2072: undefined referen
ce to `UuidToStringA@8'
:c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2076: undefined referen
ce to `RpcStringFreeA@4'
c:/mozilla/mozilla/nss/nsscapi/cobject.o: In function `nss_ckcapi_CreatePrivateK
ey':c:/mozilla/mozilla/security/nss/lib/ckfw/capi/cobject.c:2347: undefined refe
rence to `CryptSetKeyIdentifierProperty'
c:/mozilla/mozilla/nss/nsscapi/crsa.o: In function `ckcapi_GetRawHash':c:/mozill
a/mozilla/security/nss/lib/ckfw/capi/crsa.c:238: undefined reference to `CertOID
ToAlgId'
collect2: ld returned 1 exit status
make[7]: *** [c:/mozilla/mozilla/nss/nsscapi/nsscapi.dll] Error 1
make[7]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib/ckfw/ca
pi'
make[6]: *** [libs] Error 2
make[6]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib/ckfw'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/lib'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/manager'
make[3]: *** [libs_tier_toolkit] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[2]: *** [tier_toolkit] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make: *** [alldep] Error 2

I don't know how to fix this, the functions seem part of a windows library named Crypt32.lib.
Comment 12 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-26 10:09:44 PDT
I also need functions that doesn't seem to exist at all in mingw libraries.
Some of them I found in:
http://source.winehq.org/source/dlls/crypt32/cert.c

But this is all way over my head :(
I really could use some help with this.

Or is there a way to just temporarily disable nss or something? 
Comment 13 Julien Pierre 2007-07-26 10:51:08 PDT
It sounds like mingw doesn't have a full implementation of the Windows toolkit. You need to file a bug against mingw about that. For now, don't worry about nsscapi, and just skip it in the Makefile.
Comment 14 Hans-Andreas Engel 2007-07-26 12:01:12 PDT
Actually, mingw's w32api does not implement Window's toolkit, it just provides the proper header and "import library" files.

If important functions are missing in w32api, you can just add them yourself: see e.g. Bug 328499, Comment 43.  It is actually not that difficult -- basically you need to look up the declarations in MSDN and then put them in the header file.  Maybe you also need to add them to the ".def" files; the following is a trivial example
http://sourceforge.net/tracker/index.php?func=detail&aid=1456654&group_id=2435&atid=302435 

Martijn, it is great to have someone who is keeping the mingw build alive!
Comment 15 Hans-Andreas Engel 2007-07-26 12:14:59 PDT
Actually, maybe you just need to link to the proper windows library (crypt32?), see Bug 331329 how this can be done.  The Makefiles are somewhat sloppy in indicating on what libraries the code depends on, since this still works with Visual C++.
Comment 16 Robert Relyea 2007-07-26 13:50:24 PDT
You're blowing up on the windows capi PKCS #11 module. It's only built on windows. It allows you to access keys and certs in your windows CAPI store from NSS.

The options I see are:

1) conditionally don't build the capi module for mingw (see mozilla/security/nss/lib/ckfw/Makefile) if you don't need the capi module.
2) add the system crypto32 library appropriately under ming (comment 15).
3) update ming to handle the crypto library in it api (comment 14).

If you choose 1, then you won't have access to the CAPI stores, but otherwise NSS will operate fine. The former is a new function, so you probably won't notice any loss of functionality initially, but it might cause problems in the future.

bob
Comment 17 Hans-Andreas Engel 2007-07-26 14:35:14 PDT
And you seems to be lucky regarding Bob's (3): many crypto functions are already declared in w32api, see
http://www.koders.com/noncode/fidF0B170B1F8F6DDF7458BF1E5191EA754EE43F3F5.aspx
If you follow step (2), you will soon find out which ones are still missing.

[Minor point: somewhat surprisingly, it is "crypt32" without "o"]
Comment 18 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-29 15:25:14 PDT
Created attachment 274405 [details] [diff] [review]
workaround path

Thanks for all the help and suggestions!
This is the workaround which successfully allowed me to get a working build again.

-DIRS = mangle
This was also needed as a workaround, because I got also this build error:
cd mangle; /usr/bin/make -j1 libs
make[6]: Entering directory `/cygdrive/c/mozilla/mozilla/security/nss/cmd/shlibs
ign/mangle'
/cygdrive/c/mozilla/mozilla/build/cygwin-wrapper gcc -mno-cygwin -o c:/mozilla/m
ozilla/nss/mangle.o -c -g -mno-cygwin -mms-bitfields -mnop-fun-dllimport -DXP_PC
 -DSHLIB_SUFFIX=\"dll\" -DSHLIB_PREFIX=\"\" -DDEBUG -D_DEBUG -UNDEBUG -DDEBUG_mw
 -DWIN32 -D_WINDOWS -D_X86_ -DWIN95 -DNSS_ENABLE_ECC -DNSS_USE_STATIC_LIBS -Ic:/
mozilla/mozilla/dist/include/nspr -Ic:/mozilla/mozilla/dist/include  -Ic:/mozill
a/mozilla/dist/public/nss -Ic:/mozilla/mozilla/dist/private/nss -Ic:/mozilla/moz
illa/dist/include   mangle.c
make[6]: *** No rule to make target `c:/mozilla/mozilla/dist/lib/libsqlite3.a',
needed by `c:/mozilla/mozilla/nss/mangle.exe'.  Stop.
make[6]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/cmd/shlibsi
gn/mangle'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/nss/cmd/shlibsi
gn'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/security/manager'
make[3]: *** [libs_tier_toolkit] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[2]: *** [tier_toolkit] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla'
make: *** [alldep] Error 2

This seems like a linking error or something?
Comment 19 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-07-29 15:31:31 PDT
Hans-Andreas, I'll try to do step (2) again, but for the moment I'm happy to have a working build again. (and I really don't know much about coding or the building process in general)
Comment 20 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-09-09 18:08:04 PDT
Created attachment 280287 [details] [diff] [review]
fix pkix_tools.h

This needs to change anyway for mingw.
Comment 21 Robert Relyea 2007-09-10 15:42:28 PDT
Comment on attachment 280287 [details] [diff] [review]
fix pkix_tools.h

This change lives in the PKIX code, I'm flopping the review over to Alexei so that we don't trip over merge conflicts.

Alexei, if you are ok with this, you'll have to check it in, I'm pretty sure Martijn doesn't have cvs checkin access to NSS.

Martijn can you explain the difference between _WIN32 and _MSC_VER here?

Thanks.
bob
Comment 22 Martijn Wargers [:mwargers] (not working for Mozilla) 2007-09-10 16:08:54 PDT
Well, I found this post on the _MSC_VER check:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163876&SiteID=1
_WIN32 is also defined by mingw, while _MSC_VER is not. Because gcc can't handle that stuff inside that ifdef, it should have an ifdef _MSC_VER there.
Comment 23 Robert Relyea 2007-09-11 15:18:37 PDT
Oh, _MSC_VER is the Microsoft C compiler version, so it being set means we are compiling with the Microsoft compiler. It seems reasonable, though I wonder how libssl works....
Comment 24 Alexei Volkov 2007-09-12 10:03:12 PDT
Comment on attachment 280287 [details] [diff] [review]
fix pkix_tools.h

We don't want to export char *PKIX_ERRORNAMES[PKIX_NUMERRORS]; from nss dll at all. So the correct fix would be to leave only  extern const char *PKIX_ERRORNAMES[PKIX_NUMERRORS]; and remove the rest of this ifdef block.
Will submit a patch shortly.
Comment 25 Alexei Volkov 2007-09-12 10:08:29 PDT
Created attachment 280620 [details] [diff] [review]
do not import error strings from library

We will get rid of PKIX_ERRORNAMES completely in a short future, but not today.
Comment 26 Robert Relyea 2007-09-12 10:39:18 PDT
Comment on attachment 280620 [details] [diff] [review]
do not import error strings from library

Thanks for looking into this alexei.

bob
Comment 27 Alexei Volkov 2007-09-12 12:00:24 PDT
attachment 280620 [details] [diff] [review] is committed into nss trunk.
/cvsroot/mozilla/security/nss/lib/libpkix/pkix/util/pkix_tools.h,v  <--  pkix_tools.h
new revision: 1.7; previous revision: 1.6

Comment 28 Nelson Bolyard (seldom reads bugmail) 2007-09-12 12:29:34 PDT
This issue has come full circle.  The declspec was added to solve a 
build problem, and now it has been taken out to solve another one.  
I think there is high probability that this change will reintroduce 
the original problem.
Comment 29 Alexei Volkov 2007-09-12 12:47:12 PDT
The old code predates integration into nss trunk. Richard has committed the change (rev 1.1.2.21)into libpkix branch (NSS_LIBPKIX_BRANCH). The reason for the change is unclear from the integration comments, but I suspect there was intention to use the symbol in applications, that call libpkix API directly.

Note You need to log in before you can comment on or make changes to this bug.