Bug 220739 - dev-util/astyle-1.22 stable request
Bug#: 220739 Product:  Gentoo Linux Version: 2007.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: nerdboy@gentoo.org Reported By: alex.buell@munted.org.uk
Component: Ebuilds
URL: 
Summary: dev-util/astyle-1.22 stable request
Keywords:  STABLEREQ
Status Whiteboard: 
Opened: 2008-05-07 11:28 0000
Description:   Opened: 2008-05-07 11:28 0000
dev-util/astyle is masked on amd64, it may also need unmasking on other
platforms as well. 

Reproducible: Always




Unmasking the ebuild solves the problem

------- Comment #1 From Jan Kundrát 2008-05-07 12:59:10 0000 -------
Alex, please explain how is it masked, what problem are you facing here and
then reopen this bug.

------- Comment #2 From Alex Buell 2008-05-07 13:31:20 0000 -------
alexb ~ # eix astyle
* dev-util/astyle
     Available versions:  *1.15.3 ~1.15.3-r1 ~1.21 {debug libs}
     Homepage:            http://astyle.sourceforge.net/
     Description:         Artistic Style is a reindenter and reformatter of
C++, C and Java source code

alexb ~ # emerge -pv astyle

These are the packages that would be merged, in order:

Calculating dependencies /
!!! All ebuilds that could satisfy "dev-util/astyle" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-util/astyle-1.21 (masked by: ~amd64 keyword)
- dev-util/astyle-1.15.3-r1 (masked by: ~amd64 keyword)
- dev-util/astyle-1.15.3 (masked by: missing keyword)

For more information, see MASKED PACKAGES section in the emerge man page or 
refer to the Gentoo Handbook.

------- Comment #3 From Jan Kundrát 2008-05-07 13:40:16 0000 -------
The package isn't "masked", it's just available only in the stable branch.
perhaps because its maintainers  haven't deemed it "stable" yet.

------- Comment #4 From Steve Arnold 2008-05-08 01:29:25 0000 -------
More like we forgot about it and nobody filed a bug until now...  :)

Let's make this an official stable request for astyle-1.21 and I'll add the
1.22 for testing.  Gentlemen (and ladies), start your engines...  Er...

------- Comment #5 From Steve Arnold 2008-05-17 00:59:53 0000 -------
CC'ing arches...

------- Comment #6 From nixnut 2008-05-17 11:47:13 0000 -------
fails to find libawt.so on ppc with ibm-jdk-bin-1.6.0.1:

 * Applying astyle-1.22-strip.patch ...                                   [ ok
]
 * Using bootclasspath
/opt/ibm-jdk-bin-1.6.0.1/jre/lib/vm.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/facilitators.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/annotation.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/beans.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/java.util.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/jndi.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/logging.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/security.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/sql.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmorb.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmorbapi.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmcfw.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/rt.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/charsets.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/resources.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmpkcs.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmcertpathfw.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmjgssfw.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmjssefw.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmsaslfw.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmjcefw.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmjgssprovider.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmjsseprovider2.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmcertpathprovider.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ibmxmlcrypto.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/management-agent.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/xml.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/jlm.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/javascript.jar:/opt/ibm-jdk-bin-1.6.0.1/jre/lib/RACF.jar
 * Using JVM library path /opt/ibm-jdk-bin-1.6.0.1/jre/bin
 *              
 * ERROR: dev-util/astyle-1.22 failed.
 * Call stack:  
 *               ebuild.sh, line   49:  Called src_unpack
 *             environment, line 3773:  Called setup-jvm-opts
 *             environment, line 3709:  Called die
 * The specific snippet of code:
 *           die "Could not find libawt.so native library";
 *  The die message:
 *   Could not find libawt.so native library

libawt.so does exist, but it looks like paths changes compared to earlier jdk's
~ # locate libawt.so
/opt/ibm-jdk-bin-1.5.0.6/jre/bin/libawt.so
/opt/ibm-jdk-bin-1.4.2.9/jre/bin/libawt.so
/opt/ibm-jdk-bin-1.6.0.1/jre/lib/ppc/libawt.so

------- Comment #7 From Tobias Klausmann 2008-05-17 13:56:28 0000 -------
Stabled 1.21 on alpha.

------- Comment #8 From Ferris McCormick 2008-05-18 13:42:26 0000 -------
Sparc NOT stable.  This package ignores my CFLAGS/CXXFLAGS from make.conf and
uses
g++ -DNDEBUG -O3 -W -Wall -fno-rtti -fno-exceptions
This is bad on sparc.  -O3 is known to be a poor choice, and failing to use my
-mcpu= choices is terrible.  Please see Bug 59506 for details.

For reference, I have:
CFLAGS="-O2 -mcpu=ultrasparc3 -pipe"
CXXFLAGS="-O2 -mcpu=ultrasparc3 -pipe"

Apparently the problem is someplace within the package configure process,
because the ebuild does not touch CFLAGS at all.

------- Comment #9 From Christian Faulhammer 2008-05-21 19:15:21 0000 -------
No respect for CFLAGS here either, but I will stable for x86 as no regression
and the CFLAGS do no harm.

------- Comment #10 From Markus Meier 2008-05-24 13:39:19 0000 -------
amd64 stable

------- Comment #11 From Tiago Cunha 2008-05-28 17:26:03 0000 -------
Created an attachment (id=154597) [details]
astyle-1.21.ebuild-cflags-cxx.patch

* Fix hardcoded CXX.
* Honour Gentoo CXXFLAGS (when USE="debug" supplied too).
* Use ${P} instead of ${PN}-${PV}.

------- Comment #12 From Markus Rothe 2008-05-30 19:03:13 0000 -------
1.21 works ok, but I'm not going to mark it stable until a user requests so.
there is no stable version yet.

1.22 does not compile on ppc64:

../src/astyle_main.cpp:56:17: error: jni.h: No such file or directory

so 1.22 is -ppc64 now.

[ I'm not even sure how this got keyworded.. there is no changelog entry for
ppc64 ]

------- Comment #13 From Matti Bickel 2008-09-07 01:02:39 0000 -------
@nerdboy: what about the patch from comment #11? I'm at a loss why USE="debug"
doesn't disable -DNDEBUG for example.

And ppc suffers from the same error as ppc64:

g++ -DNDEBUG -DASTYLE_JNI -O3 -fpic -W -Wall -fno-rtti -fno-exceptions
-I/usr/lib/jvm/java-6-sun-1.6.0.00/include
-I/usr/lib/jvm/java-6-sun-1.6.0.00/include/linux -c -o obj/astyle_main_sj.o
../src/astyle_main.cpp
../src/astyle_main.cpp:56:17: error: jni.h: No such file or directory
g++ -DNDEBUG -DASTYLE_JNI -O3 -fpic -W -Wall -fno-rtti -fno-exceptions
-I/usr/lib/jvm/java-6-sun-1.6.0.00/include
-I/usr/lib/jvm/java-6-sun-1.6.0.00/include/linux -c -o obj/ASBeautifier_sj.o
../src/ASBeautifier.cpp
../src/astyle_main.cpp:62: error: expected constructor, destructor, or type
conversion before '*' token
../src/astyle_main.cpp:63: error: 'jobject' does not name a type
[...]

This seems to be due to:
buildgcc/Makefile:
 # NOTE for java compiles the environment variable $JAVA_HOME must be set
 # example: export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.00
 ifndef JAVA_HOME
 #    JAVA_HOME = /usr/lib/jvm/java-1.5.0-sun-1.5.0.10
    JAVA_HOME = /usr/lib/jvm/java-6-sun-1.6.0.00
 endif

Seems paludis is not adding JAVA_HOME from the enviroment, due to:
>>> Starting pkg_setup
/var/tmp/paludis/dev-util-astyle-1.22/temp/loadsaveenv: line 4650:
java-pkg-2_pkg_setup: command not found
Consequently, jni.h is not found on ppc and ppc64. Using portage, astyle-1.22
installs cleanly.

Except the CFLAGS ignorance, astyle-1.22 seems to install and work perfectly.

Leaving on ~ppc as long as the CFLAGS and paludis problems are not fixed.
Nerdboy, please say so if you want me to make the changes myself.

------- Comment #14 From Steve Arnold 2008-09-10 06:27:48 0000 -------
Sorry I've been a little busy, but don't stand on ceremony on my account.  In
other words, feel free :)   Thanks...

------- Comment #15 From Ferris McCormick 2008-09-10 13:06:27 0000 -------
Sparc stable for astyle-1.21.

------- Comment #16 From Steve Arnold 2008-09-28 17:58:58 0000 -------
Okay, I have a fixed-up version of 1.22 (I added the CFLAGS stuff in the
attachment and fixed JAVA_HOME) but it won't commit as-is due to java-config
deps on sparc and alpha.  This version works with gcc 4.3 but 1.21 does not (I
looked at patching the latter, but there were just too many errors).

sparc/alpha: would you like to mask the java USE flag and keep the package?

ppc64: would you like to try keywording now?

I'll attach the updated ebuild (no additional patches required) and wait on the
commit for now...

------- Comment #17 From Steve Arnold 2008-09-28 18:00:15 0000 -------
Created an attachment (id=166700) [details]
Updated ebuild (works)

------- Comment #18 From Friedrich Oslage 2008-09-29 19:46:50 0000 -------
Created an attachment (id=166778) [details]
astyle-1.22.ebuild-no-java.patch

(In reply to comment #16)
> Okay, I have a fixed-up version of 1.22 (I added the CFLAGS stuff in the
> attachment and fixed JAVA_HOME) but it won't commit as-is due to java-config
> deps on sparc and alpha.  This version works with gcc 4.3 but 1.21 does not (I
> looked at patching the latter, but there were just too many errors).
> 
> sparc/alpha: would you like to mask the java USE flag and keep the package?

Java use flag is already masked globally on sparc. Why are you inheriting both,
java-pkg-2 and java-pkg-opt-2? Afaik the first is for required java support and
the later for optional.

I attached a patch, seems to be fine(at least with -java)

------- Comment #19 From Steve Arnold 2008-10-17 04:03:16 0000 -------
All the above issues should be fixed in 1.22 now, so I'd like to stablize that
one and delete 1.21 (the older ones too, unless someone really needs one). 
Thanks again for all the comments.

------- Comment #20 From Ferris McCormick 2008-10-17 12:29:47 0000 -------
Sparc stable for astyle-1.22.

------- Comment #21 From Matti Bickel 2008-10-18 02:59:27 0000 -------
Thanks for taking care, i quite neglected this bug...

But here's a ppc stable keyword anyway :)

------- Comment #22 From Raúl Porcel 2008-10-18 15:20:07 0000 -------
alpha/x86 stable

------- Comment #23 From Steve Arnold 2008-10-18 19:15:16 0000 -------
One more try for amd64 please?  And would ppc64 like to try keywording now?  I
notice there's at least an IBM JDK for ppc64, and in theory it should work... 
Thanks in advance...

------- Comment #24 From Thomas Anderson (tanderson) 2008-10-20 13:17:31 0000 -------
USE="libs java" on amd64 results in prestripped files:

>>> Completed installing astyle-1.22 into /var/tmp/portage/dev-util/astyle-1.22/image/



 * QA Notice: Pre-stripped files found:
 * /var/tmp/portage/dev-util/astyle-1.22/image/usr/lib64/libastylej.so
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/bin/astyle
   usr/lib64/libastyle.so
   usr/lib64/libastyle.a
* checking 13 files for package collisions
>>> Merging dev-util/astyle-1.22 to /

------- Comment #25 From Steve Arnold 2008-11-11 02:41:59 0000 -------
Forget one; try it now (plus sync time)...

------- Comment #26 From Steve Arnold 2008-11-14 02:56:21 0000 -------
That should say "I forgot one" but now the last -s is gone, so please try it
one more time...

------- Comment #27 From Markus Meier 2008-11-22 23:30:17 0000 -------
amd64 stable

------- Comment #28 From Brent Baude 2008-12-02 22:49:09 0000 -------
~ppc64

------- Comment #29 From Alex Buell 2008-12-18 12:45:09 0000 -------
If you've all finished, feel free to close this :-D