X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=HIjRCuN/+vLqTKgpS53GhuNzMe1NdYujlD0P2paEHFfrfra4j8d01 4/5EGBs/kC8Gz69vR1nnuOjSYQ5zGQP+63EHOkaqnTFxygmW4UeAHMvsYM97+0Ag 3Hg2SXKAifkJ3hqfFhGH7uX4An9UG7hl0wjHW0G/DVw1Zd3ei5cFDE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=G2qlH/Ei3rL1ZduES+d3JWewyx4=; b=gFqgmy9FHRvCCq4JLyw+Lu1Q5rac Dchc30CoQ4FJ254oKp4sgXoVP2CzHkU68COAuzshGbTSNv5YvMY3+eC7jRzr5K5F uJ429I+bc9yPm9GVNLeLVm5hBAXKE+gLdFzj5PaVydGAnDNHGggPyCTakrJpiatx I8GG9dlYzEmULyE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Thu, 19 Dec 2013 15:02:18 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: YouCompleteMe build fails: problem with LONG_BIT in pyport.h or ld missing python lib Message-ID: <20131219140218.GA26706@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <527A5BCA DOT 5020801 AT tura-home DOT de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec 19 11:57, D wrote: > Whitedwarf tura-home.de> writes: > > /home/matu_gr/.vim/bundle/YouCompleteMe/cpp/BoostParts/libs/python/src/ > converter/arg_to_python_base.cpp:6: > > /usr/include/python2.7/pyport.h:886:2: Fehler: #error "LONG_BIT > > definition appears wrong for platform (bad gcc/glibc config?)." > > #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc > > config?)." > > ^ > > [...] > > System/versions: win7-64, cygwin64 with cygwin-gcc installed in 32- and > > 64-bit versions, https://github.com/Valloric/YouCompleteMe >=20 > I've been having the same problem as you, though YCM compiles fine under = 32- > bit Cygwin. I don't think that using the i686 compilers is the way to go= =20 > because, as said at the top of this page (https://github.com/Valloric/ > YouCompleteMe/wiki/Windows-Installation-Guide): >=20 > "Before starting this installation procedure, it's critically important= =20 > that you understand that the architecture (x86 vs x86-64) that you build= =20 > ycm_core.pyd for has to match the architecture of the python27.dll on you= r=20 > system and the architecture of the Vim binary you will be running. All=20 > three need to match, otherwise things won't work." >=20 > I have also tried downloading older versions of YCM, up to August 2013,= =20 > because that's when the author of the YCM installation for Cygwin guide= =20 > (see link above) wrote his guide. Still the same LONG_INT error. >=20 > I hope a solution for this emerges. The solution for this is a bit of header file debugging. Quite obviously, LONG_BIT is defined wrongly at some point in the header files, so you have to find out what part of the project is doing that. Keep in mind that sizeof(long) is 8 on 64 bit Cygwin[1][2]. The test in pyport.h which errors out here is basically this: #ifndef LONG_BIT #define LONG_BIT (8 * SIZEOF_LONG) #endif #if LONG_BIT !=3D 8 * SIZEOF_LONG #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc con= fig?)." #endif SIZEOF_LONG is correctly defined as 8 in pyconfig.h. If LONG_BIT would be undefined at this point, pyport.h would correctly define LONG_BIT to 64 here. So it's evident that some other header defines LONG_BIT wrongly, probably to 32, because somebody wrongly assumes that sizeof(long) is always 4 on Cygwin. Corinna [1] http://cygwin.com/faq/faq.html#faq.programming.64bitporting [2] http://cygwin.com/faq/faq.html#faq.programming.64bitporting-fail --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --NzB8fVQJ5HfG6fxh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBAgAGBQJSsvxqAAoJEPU2Bp2uRE+gKrwP/AwUcUCNU4wkq7xIVk9Q5cAA Clq6uNaIJMUHOG+EzzL4V9sH4IACrcR+BE/kiKISyaI2su7rxLSkTlejznmpoVdV XkSrbY64nrq4ol0Db7iWppPeVMwG6qtXAk8McwpYjBa1g4jN8nU8IvQFimknfWYi ZeVFDc+R56KQ2AXUnLQIU7YcuEvuRopTyQ+pZtiId1fZkWwRw9b2NofDvJ+BAWhs PtvUZNKL2UlVX5hCO7fZ/D2wX+4aI3Qfvzs5LaqV7WDVUcRRVv9cer9EZgNuF3vn IZk/hidb4Snw79Eel09RnpkYxsiye5WoDhTeYbcPdejQtcwWdjJ1OVcj/hmLzBvl xBuarlpW+e/SDDN5EK8lzKyxL1Xjxj5GkUWLbQsjBNQp6wa/8KtW29t68tVBrhbB 1edrswwQctd8cH+6byeislPmZKcqIkBNdhOv5Vk1fIDC0xNyYWE5Xq7cq7toZXYY M6ZKM512i1hncEY9PQrBGaOC0ojhV4ndFwEY6xr51dmUWK/ywjXATMHlfXOGgFRS i5gQLE0FNIMdKHp9Rt1gHmgY7M8hkVweqW30sUi2R/suQkh1JgUlXZcrKKOfVg9t dQecQW5cnQNdLB9KcNn8DSc+Tm0qIJ4bFRydwelLdoJmZiSfcE0yz8ceVC8E6fiD KvFjlYDyOsSCrcApD2ZX =cBeo -----END PGP SIGNATURE----- --NzB8fVQJ5HfG6fxh--