Mail Archives: cygwin/2011/04/30/03:01:18
Message-Id: | <201104300701.p3U71F3e006091@delorie.com>
|
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=-2.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID,TW_BJ,TW_BL,TW_GD
|
X-Spam-Check-By: | sourceware.org
|
X-SWARE-Spam-Status: | No, hits=-0.7 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MISSING_MID,RCVD_IN_DNSWL_LOW,TW_BJ,TW_BL,TW_GD,T_TO_NO_BRKTS_FREEMAIL
|
From: | Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
|
Date: | Sat, 30 Apr 2011 02:52:35 -0400
|
Subject: | [ANNOUNCEMENT] Updated: gcc-mingw-{core/g++/g77/gdc/java/objc}-20050522-3; Obsoleted: gcc-mingw-gpc-20040810-3
|
To: | cygwin AT cygwin DOT com
|
Reply-To: | cygwin AT cygwin DOT com
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
These packages are "addons" to the gcc-3 compiler suite, and provide
the necessary files for the -mno-cygwin mode of that compiler. It has
LONG been a goal to retire -mno-cygwin, and instead provide a cygwin-
hosted mingw cross compiler from the gcc-4.x family.
This update is the first step in attaining that goal. These packages
contain exactly the same files as their predecessors, but the contents
have been rearranged to install into a directory structure that can
co-exist with that required by the (TBD) cross compiler. With the
exception of the already non-functional pascal, which was made obsolete
in recognition of that, the major change is in the behavior of the
postinstall scripts of the various packages.
gcc-mingw-ada-20050522-3-src.tar.bz2
gcc-mingw-ada-20050522-3.tar.bz2
gcc-mingw-core-20050522-3-src.tar.bz2
gcc-mingw-core-20050522-3.tar.bz2
gcc-mingw-g++-20050522-3-src.tar.bz2
gcc-mingw-g++-20050522-3.tar.bz2
gcc-mingw-g77-20050522-3-src.tar.bz2
gcc-mingw-g77-20050522-3.tar.bz2
gcc-mingw-gdc-20050522-3-src.tar.bz2
gcc-mingw-gdc-20050522-3.tar.bz2
gcc-mingw-java-20050522-3-src.tar.bz2
gcc-mingw-java-20050522-3.tar.bz2
gcc-mingw-objc-20050522-3-src.tar.bz2
gcc-mingw-objc-20050522-3.tar.bz2
gcc-mingw-gpc-20040810-3-src.tar.bz2
gcc-mingw-gpc-20040810-3.tar.bz2
Here's the problem: the old gcc-mingw-* packages operated as follows:
1) "install" an (inner) tarball into /etc/postinstall
2) run a postinstall script that created some symbolic links, and
then unpacked that inner tarball.
Unfortunately, these symbolic links can mess up any coexistance with
(and, indeed, even the standalone operation of) a REAL mingw cross
compiler. So, those symbolic links have got to go.
/usr/i686-pc-mingw32/bin
/usr/i686-pc-mingw32/lib
/usr/i686-pc-mingw32/include
However, they have to be removed *before* installing any of the actual
cross-compiler elements (like the new mingw-binutils, or the updated
mingw-runtime package, or the new mingw-gcc cross compiler itself).
Since we have no facility for "pre-install" scripts...the best I could
figure was the following procedure:
A) FIRST, upgrade the existing gcc-mingw-* packages. The new versions
have updated postinstall scripts and preremove scripts that Do The
Right Thing;
1) remove all leftover symbolic links from the older packages'
postinstall scripts
2) create the correct directory structure
3) unpack the (reorganized) inner tarballs as appropriate
4) for mingw-gcc-core, also create some symlinks to elements
of the (updated) mingw-runtime package. These will be dangling,
until mingw-runtime is upgraded.
B) THEN, allow upgrade of mingw-runtime, and installation of the new
mingw-w32api, mingw-binutils, mingw-pthreads packages -- as well as
the mingw-gcc (cross compiler) packages.
There are two unfortunate aspects of this procedure: first, you MUST
run setup.exe to perform step (A), and allow it to complete. THEN, you
can run setup.exe AGAIN to do (B). Don't try to "mix" the two steps
together in the same setup.exe session.
To enforce this -- for most people -- I'm releasing the gcc-mingw
packages for step (A) first, WITHOUT providing any of the other
packages. In fact, we'll probably delay step (B) for about a month!
That way, MOST people will follow the correct, step-wise procedure "by
default". For those who only update infrequently, and miss the "one
month" window...well, unless they take care to follow the (A), (B)
procedure above, various bad things will happen. It's fixable, but
awkward. See HELP!!! below.
The second unfortunate aspect of this is it actually *breaks*
"gcc-3 -mno-cygwin" !!!
The key bit is step (A)-(4) above: the dangling symlinks. There are
two workarounds:
CHOICE ONE: brute force
======================================
cd /usr/i686-pc-mingw32/lib
for f in *.o ; do
rm -f $f
ln -fs /usr/lib/mingw/$f .
done
The symlinks that exist in that directory were created to work with
the (to be released) mingw-runtime update. However, since we don't
have that yet, we need to 'revert' the symlinks to point to the where
the *current* mingw-runtime puts them. 'Course, you'll need to switch
them back after we get those other packages -- but that's easy: you
just reinstall gcc-mingw-core.
Also, you MAY find it necessary to use this:
CC="gcc-3 -mno-cygwin -L/usr/lib/mingw -L/usr/lib/w32api -I/usr/include/mingw -I/usr/include/w32api"
CXX="g++-3 -mno-cygwin -L/usr/lib/mingw -L/usr/lib/w32api -I/usr/include/mingw -I/usr/include/w32api"
instead of just
CC="gcc-3 -mno-cygwin"
CXX="g++-3 -mno-cygwin"
...at least until the updated mingw-runtime package is officially
released.
CHOICE TWO: get the "missing" packages
early, from alternate download site
======================================
After installing these gcc-mingw-* packages via setup.exe and your
favorite cygwin mirror, run setup.exe a second time, and point it HERE:
http://cygutils.fruitbat.org/ITP/mingw-gcc/
You can then install the missing packages from that location (See, by
pulling this trick, where you get the new gcc-mingw-* addons from
cygwin.com, but have to go somewhere else, temporarily, to get the other
packages, I guarantee that you install them in the proper order. Read
the HELP!!! below, and be grateful you have avoided that pain.)
The downside is, you have to run setup.exe with the -X switch, because
the setup.ini at that site is unsigned.
Note that all of this ugliness only arises because of the weird wayu
*existing* installations of gcc-3/gcc-mingw-* packages are installed.
On a virgin system (or one that doesn't have gcc-3/gcc-mingw-*
installed) none of this step-wise procedure is necessary.
I have only tested that 'gcc-3 -mno-cygwin' and 'g++-3 -mno-cygwin'
work properly. It is a Known Issue(tm) that in this new configuration,
'gcc-3 -mno-cygwin -nostdlib/-nostdinc' will break. If this is
important to you, then add
-spec /usr/lib/gcc/i686-pc-mingw32/3.4.4/orig.spec
or...start using the mingw-gcc-4.5.x cross compiler instead (which is
available today from the cygutils.fruitbat.org site).
HELP!!! YOU BROKE MY GCC-3 COMPILER, YOU STINK!!!
==============================================================
Ah, you installed everything all at once and didn't follow the step-wise
proecure described above -- perhaps because you didn't update at all
during the month-long transition period and it is now after 1 June 2011,
or you got overexcited and pointed setup.exe at cygutils.fruitbat.org
BEFORE installing the new gcc-mingw-* packages. What should you do now?
1) Don't panic.
2) Use setup.exe to uninstall ALL of the following, if you have them:
gcc-3 packages:
gcc-core
gcc-ada
gcc-g++
gcc-g77
gcc-gdc
gcc-gm2
gcc-gpc
gcc-java
gcc-objc
gcc-3 mingw add-on packages
gcc-mingw-core
gcc-mingw-ada
gcc-mingw-g++
gcc-mingw-g77
gcc-mingw-gdc
gcc-mingw-gpc
gcc-mingw-java
gcc-mingw-objc
gcc-testsuite
any new mingw- cross compiler packages (NOT mingw64- ones,
those are fine, leave them alone)
mingw-runtime [*]
mingw-binutils
mingw-w32api
mingw-pthreads
mingw-gcc-core
mingw-gcc-fortran
mingw-gcc-g++
mingw-gcc-objc
...AND any mingw- library packages:
mingw-zlib | mingw-zlib1 | mingw-zlib-devel
mingw-bzip2 | mingw-libbz2_1 | mingw-libbz2-devel
mingw-libgcrypt | mingw-libgcrypt11 | mingw-libgcrypt-devel
mingw-libgpg-error | mingw-libgpg0 | mingw-libgpg-error-devel
mingw-xz | mingw-liblzma1 | mingw-liblzma-devel
[*] setup.exe might complain about this, because other packages require
it. Go ahead and tell setup.exe you really know what you're doing,
and want to remove the package.
3) Next, do some cleanup. Go look in
/usr/i686-pc-mingw32
if there are any directories or symlinks:
bin
lib
include
then remove them, with extreme prejudice.
4) Now, re-run setup, and install ONLY the following
gcc-core-3.4.4-999 or newer
gcc-mingw-core-20050522-3 or newer
gcc-g++-3.4.4-999 if you want c++
gcc-mingw-g++-20050522-3
gcc-g77-3.4.4-999 if you want fortran
gcc-mingw-g77-20050522-3
(Ditto for objc, java, ada, and gdc)
Setup is going to whine about mingw-runtime mssing. Ignore
it -- and DON'T let it install mingw-runtime!
Allow this instance of setup.exe to run to completion, and
exit.
5) Now, let's check: look in
/usr/i686-pc-mingw32
There should be three *directories* -- not symlinks -- present:
bin
include
lib
Assuming that is the case, NOW you can install some additional
packages...
6) Using setup, install
mingw-runtime-3.18-2 (or whatever version of mingw-runtime
is current AS OF 1 JUNE 2011)
mignw-pthreads
mingw-w32api
mingw-binutils
mingw-gcc-core
mingw-gcc-g++ (if you want C++)
mingw-gcc-fortran (ditto)
mingw-gcc-objc (ditto)
Let setup.exe run to completion, and exit.
7) Finally, you can then run setup.exe AGAIN, and this time install
any of the libraries you need:
mingw-zlib | mingw-zlib1 | mingw-zlib-devel
mingw-bzip2 | mingw-libbz2_1 | mingw-libbz2-devel
mingw-libgcrypt | mingw-libgcrypt11 | mingw-libgcrypt-devel
mingw-libgpg-error | mingw-libgpg0 | mingw-libgpg-error-devel
mingw-xz | mingw-liblzma1 | mingw-liblzma-devel
--
Charles Wilson
====================================================================
To update your installation, click on the "Install Cygwin now" link
on the http://cygwin.com/ web page. This downloads setup.exe to
your system. Then, run setup and answer all of the questions.
*** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***
If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:
cygwin-announce-unsubscribe-you=yourdomain DOT com AT cygwin DOT com
If you need more information on unsubscribing, start reading here:
http://sourceware.org/lists.html#unsubscribe-simple
Please read *all* of the information on unsubscribing that is available
starting at this URL.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -