From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E1B3321A0483A for ; Wed, 12 Apr 2017 22:08:44 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2017 22:08:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,193,1488873600"; d="scan'208";a="1134783707" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 12 Apr 2017 22:08:44 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Apr 2017 22:08:44 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Apr 2017 22:08:43 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.224]) with mapi id 14.03.0319.002; Thu, 13 Apr 2017 13:08:41 +0800 From: "Long, Qin" To: winddy , edk2-devel Thread-Topic: [edk2] CryptoPkg compiles error: BIO_printf() and BIO_snprintf() redefined. Thread-Index: AQHSs/84cMawt/iQ7UuUiECeFXzq96HCvxAA Date: Thu, 13 Apr 2017 05:08:40 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: CryptoPkg compiles error: BIO_printf() and BIO_snprintf() redefined. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 05:08:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > winddy > Sent: Thursday, April 13, 2017 10:39 AM > To: edk2-devel > Subject: [edk2] CryptoPkg compiles error: BIO_printf() and BIO_snprintf() > redefined. >=20 > Hi experts, > Now I compile CryptoPkg in lastest UDK, I find there is a build erro= r: >=20 > BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_snprintf already > defined i n OpensslLib.lib(b_print.obj) > BaseCryptLib.lib(CrtWrapper.obj) : error LNK2005: BIO_printf already defi= ned > in > OpensslLib.lib(b_print.obj) > d:\project\udkapp\udkapp\Build\WinddyPkg\RELEASE_DDK7600\X64\Windd > yPkg\Dxe\Crypt > Dxe\CryptDxe\DEBUG\CryptDxe.dll : fatal error LNK1169: one or more > multiply defi ned symbols found Please check your OpensslLib.inf, the b_print.c should not be there. And the process_file.pl should filter this file into the final file list in= INF. >=20 > Both c file "CryptoPkg\Library\BaseCryptLib\SysCall\CrtWrapper.c" an= d c > file "CryptoPkg\Library\OpensslLib\openssl\crypto\bio\b_print.c" defined > function BIO_printf(), BIO_snprintf(). >=20 > I just remove the dummy functions in CrtWrapper.c, the build proces= s is > successful. > Is that right? >=20 > BTW, I think someone maybe does not know how to run perl script for > openssl library init, so I write down my trying steps under windows 7 64= bit > for your reference: > 1. download and install ActivePerl-5.24.1.2402-MSWin32-x64-401627.exe > 2. cmdline run "ppm install dmake" > 3. download openssl-1.1.0e.tar.gz and unpack it to > CryptoPkg/Library/OpensslLib/openssl. > 4. rename "openssl\Configure" to "openssl\Configure.pl" > 5. modify file process_files.pl line 49: "./Configure" -> "Configure.pl" > 6. under cmdline, cd to "CryptoPkg\Library\OpensslLib" and run > "process_files.pl" Use "Perl process_files.pl" is fine enough. If you are using Windows and installed Git-Windows, just run "perl process_= files.pl" In your Git Bash (Perl should be included in your MINGW environment). >=20 > Thank you. >=20 >=20 >=20 > ------------------ > BR > winddy_zhang > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel