Skip to main content

Problem [temporally solved] gcc --gc-sections

1 reply [Last post]
J_Carter
Offline
Joined: 2012-01-02
Points: 0

hi everyone,

when i try to execute i get the following error:

kk@kk-VirtualBox:~/squawk$ ./d -prod -mac -o2 rom cldc
/usr/bin/java -Xms128M -Xmx384M -jar build.jar
Platform: Linux-i386
PLATFORM_TYPE=NATIVE
GC_com.sun.squawk.Lisp2Collector=false
GC_com.sun.squawk.Lisp2GenerationalCollector=true
GC_com.sun.squawk.CheneyCollector=false
[running rom...]
[running romize...]
Loaded suite stripping settings from squawk.library.properties
Loaded class excludes list from squawk.exclude
[translating suite squawk [type: library, closed: false, parent: null] ...]
[Including resource: META-INF/MANIFEST.MF]
Romizer processed 514 classes and generated 7 files.
[preprocessing with forced JAVA5SYNTAX for vm2c]
[running runvm2c...]
[compiling floating point sources in vmcore/src/vm/fp ...]
[compiling native verification sources in vmcore/src/vm/util ...]
[compiling 'vmcore/src/vm/squawk.c' ...]
[linking 'squawk' ...]
gcc: Fehler: nicht erkannte Option »--gc-sections«
Exception while running command rom
build failed: Process.exec(gcc --gc-sections -o squawk vmcore/build/s_copysign.o vmcore/build/k_tan.o vmcore/build/fp_bytecodes.o vmcore/build/s_floor.o vmcore/build/k_rem_pio2.o vmcore/build/w_sqrt.o vmcore/build/s_scalbn.o vmcore/build/k_sin.o vmcore/build/k_cos.o vmcore/build/s_ceil.o vmcore/build/s_tan.o vmcore/build/e_rem_pio2.o vmcore/build/e_sqrt.o vmcore/build/s_cos.o vmcore/build/s_fabs.o vmcore/build/s_sin.o vmcore/build/sha.o vmcore/build/squawk.o -ldl -lm -lnsl -lpthread) returned 1

Iam using the following configuration:

Ubuntu 11.10 (32bit) in a VirtualBox

Java-7-OpenJDK-i386 (32bit)

gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1

A temporally solution is to change the file: /squawk-trunk/builder/src/com/sun/squawk/builder/ccompiler/GccCompiler.java

I add in line 213: exec = "-Wl,--gc-sections -o " + output;

kk@kk-VirtualBox:~/squawk/builder$ ./bld.sh
warning: [options] bootstrap class path not set in conjunction with -source 1.5
1 warning
warning: [options] bootstrap class path not set in conjunction with -source 1.5
src/com/sun/squawk/builder/commands/MakeAPI.java:30: error: package com.sun.javadoc does not exist
import com.sun.javadoc.*;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:292: error: cannot find symbol
private RootDoc root;
^
symbol: class RootDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:576: error: cannot find symbol
String ref(Type type, boolean qualified, boolean insideDocComment) {
^
symbol: class Type
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:621: error: cannot find symbol
private void printClass(SourceFile sf, ClassDoc cdoc, Suite.Class klass, boolean nestedClass) {
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:666: error: cannot find symbol
private void printNestedClasses(SourceFile sf, ClassDoc[] cdocs) {
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:684: error: cannot find symbol
String formatMethodDeclaration(ExecutableMemberDoc mdoc) {
^
symbol: class ExecutableMemberDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:720: error: cannot find symbol
static ClassDoc[] filterPragmas(ClassDoc[] exceptions) {
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:720: error: cannot find symbol
static ClassDoc[] filterPragmas(ClassDoc[] exceptions) {
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:821: error: cannot find symbol
static String sig(Type type) {
^
symbol: class Type
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:868: error: cannot find symbol
static String sig(ClassDoc enclosingThis, Parameter[] parameters, String returnType) {
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:868: error: cannot find symbol
static String sig(ClassDoc enclosingThis, Parameter[] parameters, String returnType) {
^
symbol: class Parameter
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:887: error: cannot find symbol
static String sig(Parameter[] parameters, String returnType) {
^
symbol: class Parameter
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:898: error: cannot find symbol
static String sig(Parameter[] parameters, Type returnType) {
^
symbol: class Parameter
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:898: error: cannot find symbol
static String sig(Parameter[] parameters, Type returnType) {
^
symbol: class Type
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:924: error: cannot find symbol
static ClassDoc getTopLevelClass(ClassDoc cdoc) {
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:924: error: cannot find symbol
static ClassDoc getTopLevelClass(ClassDoc cdoc) {
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:939: error: cannot find symbol
static String getDefaultValue(Type type) {
^
symbol: class Type
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:1040: error: cannot find symbol
public static boolean start(RootDoc root) {
^
symbol: class RootDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:1270: error: cannot find symbol
List getMethods(DocErrorReporter der, ExecutableMemberDoc[] mdocs) {
^
symbol: class DocErrorReporter
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1270: error: cannot find symbol
List getMethods(DocErrorReporter der, ExecutableMemberDoc[] mdocs) {
^
symbol: class ExecutableMemberDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1313: error: cannot find symbol
List getFields(DocErrorReporter der, FieldDoc[] fdocs) {
^
symbol: class DocErrorReporter
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1313: error: cannot find symbol
List getFields(DocErrorReporter der, FieldDoc[] fdocs) {
^
symbol: class FieldDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1055: error: cannot find symbol
private final ClassDoc cdoc;
^
symbol: class ClassDoc
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1062: error: cannot find symbol
SourceFile(ClassDoc cdoc) {
^
symbol: class ClassDoc
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1082: error: cannot find symbol
void printDoc(Doc doc, MakeAPI api) {
^
symbol: class Doc
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1100: error: cannot find symbol
private void findRefs(MakeAPI api, Tag[] tags) {
^
symbol: class Tag
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:246: error: cannot find symbol
final ClassDoc cdoc;
^
symbol: class ClassDoc
location: class MakeAPI.Constructors
src/com/sun/squawk/builder/commands/MakeAPI.java:249: error: cannot find symbol
Constructors(ClassDoc cdoc) {
^
symbol: class ClassDoc
location: class MakeAPI.Constructors
src/com/sun/squawk/builder/commands/MakeAPI.java:253: error: cannot find symbol
void add(ConstructorDoc c) {
^
symbol: class ConstructorDoc
location: class MakeAPI.Constructors
src/com/sun/squawk/builder/commands/MakeAPI.java:139: error: cannot find symbol
final ConstructorDoc source;
^
symbol: class ConstructorDoc
location: class MakeAPI.Constructors.SourceConstructor
src/com/sun/squawk/builder/commands/MakeAPI.java:140: error: cannot find symbol
SourceConstructor(ConstructorDoc source) {
^
symbol: class ConstructorDoc
location: class MakeAPI.Constructors.SourceConstructor
src/com/sun/squawk/builder/commands/MakePlatformStubs.java:29: warning: Main is internal proprietary API and may be removed in a future release
import sun.tools.jar.Main;
^
src/com/sun/squawk/builder/ToDoTaglet.java:27: error: package com.sun.tools.doclets does not exist
import com.sun.tools.doclets.Taglet;
^
src/com/sun/squawk/builder/ToDoTaglet.java:45: error: cannot find symbol
public class ToDoTaglet implements Taglet {
^
symbol: class Taglet
src/com/sun/squawk/builder/ToDoTaglet.java:152: error: package com.sun.javadoc does not exist
public String toString(com.sun.javadoc.Tag tag) {
^
src/com/sun/squawk/builder/ToDoTaglet.java:164: error: package com.sun.javadoc does not exist
public String toString(com.sun.javadoc.Tag[] tags) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:118: error: cannot find symbol
ClassDoc sdoc = cdoc.superclass();
^
symbol: class ClassDoc
location: class MakeAPI.Constructors.Constructor
src/com/sun/squawk/builder/commands/MakeAPI.java:162: error: cannot find symbol
Parameter[] parameters = source.parameters();
^
symbol: class Parameter
location: class MakeAPI.Constructors.SourceConstructor
src/com/sun/squawk/builder/commands/MakeAPI.java:208: error: cannot find symbol
ClassDoc[] exceptions = ( (SourceConstructor) superConstructor).source.thrownExceptions();
^
symbol: class ClassDoc
location: class MakeAPI.Constructors.SyntheticConstructor
src/com/sun/squawk/builder/commands/MakeAPI.java:452: error: cannot find symbol
ClassDoc cdoc = root.classNamed(klass.name);
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:482: error: cannot find symbol
ClassDoc cdoc = root.classNamed(klass.name);
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:495: error: cannot find symbol
constructors.add((ConstructorDoc)iter.next());
^
symbol: class ConstructorDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:507: error: cannot find symbol
ClassDoc cdoc = root.classNamed(klass.name);
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:516: error: cannot find symbol
ClassDoc sdoc = cdoc.superclass();
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:577: error: cannot find symbol
ClassDoc cdoc = type.asClassDoc();
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:595: error: cannot find symbol
ClassDoc ref = (ClassDoc)currentSourceRefs.get(name);
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:595: error: cannot find symbol
ClassDoc ref = (ClassDoc)currentSourceRefs.get(name);
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:637: error: cannot find symbol
ClassDoc[] interfaces = filterPragmas(cdoc.interfaces());
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:668: error: cannot find symbol
ClassDoc cdoc = cdocs[i];
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:685: error: cannot find symbol
String returnType = (mdoc instanceof MethodDoc ? ref(((MethodDoc)mdoc).returnType(), false, false) + " " : "");
^
symbol: class MethodDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:685: error: cannot find symbol
String returnType = (mdoc instanceof MethodDoc ? ref(((MethodDoc)mdoc).returnType(), false, false) + " " : "");
^
symbol: class MethodDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:692: error: cannot find symbol
Parameter[] parameters = mdoc.parameters();
^
symbol: class Parameter
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:694: error: cannot find symbol
Parameter parameter = parameters[i];
^
symbol: class Parameter
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:704: error: cannot find symbol
ClassDoc[] exceptions = filterPragmas(mdoc.thrownExceptions());
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:724: error: cannot find symbol
ClassDoc exception = exceptions[i];
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:730: error: cannot find symbol
exceptions = new ClassDoc[.size()];
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:744: error: cannot find symbol
MethodDoc mdoc = (MethodDoc)i.next();
^
symbol: class MethodDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:744: error: cannot find symbol
MethodDoc mdoc = (MethodDoc)i.next();
^
symbol: class MethodDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:766: error: cannot find symbol
FieldDoc fdoc = (FieldDoc)i.next();
^
symbol: class FieldDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:766: error: cannot find symbol
FieldDoc fdoc = (FieldDoc)i.next();
^
symbol: class FieldDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:825: error: cannot find symbol
ClassDoc cdoc = type.asClassDoc();
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:831: error: cannot find symbol
ClassDoc outer = cdoc.containingClass();
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:833: error: cannot find symbol
ClassDoc nested = cdoc;
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:925: error: cannot find symbol
ClassDoc outer = cdoc.containingClass();
^
symbol: class ClassDoc
location: class MakeAPI
src/com/sun/squawk/builder/commands/MakeAPI.java:940: error: strings in switch are not supported in -source 1.5
switch (sig(type).charAt(0)) {
^
(use -source 7 or higher to enable strings in switch)
src/com/sun/squawk/builder/commands/MakeAPI.java:1272: error: cannot find symbol
boolean constructors = (mdocs instanceof ConstructorDoc[]);
^
symbol: class ConstructorDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1280: error: cannot find symbol
ExecutableMemberDoc mdoc = mdocs[i];
^
symbol: class ExecutableMemberDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1283: error: cannot find symbol
ClassDoc definingClass = mdoc.containingClass();
^
symbol: class ClassDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1284: error: cannot find symbol
ClassDoc enclosingThis = null;
^
symbol: class ClassDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1290: error: cannot find symbol
sourceNameDesc = mdoc.name() + MakeAPI.sig(mdoc.parameters(), ((MethodDoc)mdoc).returnType());
^
symbol: class MethodDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1320: error: cannot find symbol
FieldDoc fdoc = fdocs[i];
^
symbol: class FieldDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1334: error: cannot find symbol
FieldDoc fdoc = fdocs[i];
^
symbol: class FieldDoc
location: class Class
src/com/sun/squawk/builder/commands/MakeAPI.java:1102: error: cannot find symbol
Tag tag = tags[i];
^
symbol: class Tag
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1104: error: cannot find symbol
if (tag instanceof SeeTag) {
^
symbol: class SeeTag
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1105: error: cannot find symbol
SeeTag ref = (SeeTag) tag;
^
symbol: class SeeTag
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1105: error: cannot find symbol
SeeTag ref = (SeeTag) tag;
^
symbol: class SeeTag
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1106: error: cannot find symbol
ClassDoc cref = ref.referencedClass();
^
symbol: class ClassDoc
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1181: error: cannot find symbol
ClassDoc ref = MakeAPI.getTopLevelClass((ClassDoc)iter.next());
^
symbol: class ClassDoc
location: class SourceFile
src/com/sun/squawk/builder/commands/MakeAPI.java:1181: error: cannot find symbol
ClassDoc ref = MakeAPI.getTopLevelClass((ClassDoc)iter.next());
^
symbol: class ClassDoc
location: class SourceFile
src/com/sun/squawk/builder/commands/MakePlatformStubs.java:63: warning: Main is internal proprietary API and may be removed in a future release
new Main(System.out, System.err, "jar").run(new String[] {"umf", "imp/resources/META-INF/MANIFEST.MF", stubJarFile.getPath()});
^
src/com/sun/squawk/builder/commands/MakePlatformStubs.java:67: warning: Main is internal proprietary API and may be removed in a future release
new Main(System.out, System.err, "jar").run(new String[] {"cmf", "imp/resources/META-INF/MANIFEST.MF", stubJarFile.getPath()});
^
src/com/sun/squawk/builder/ToDoTaglet.java:140: error: cannot find symbol
Taglet t = (Taglet) tagletMap.get(tag.getName());
^
symbol: class Taglet
location: class ToDoTaglet
src/com/sun/squawk/builder/ToDoTaglet.java:140: error: cannot find symbol
Taglet t = (Taglet) tagletMap.get(tag.getName());
^
symbol: class Taglet
location: class ToDoTaglet
80 errors
4 warnings

to solve that problem i changed builder/bld.sh in line 55:

$JAVAC -cp classes:../vm2c/lib/openjdk-javac-6-b12.jar:/usr/lib/jvm/java-7-openjdk-i386/lib/tools.jar -target 1.5 -source 1.5 -d classes -g `find src -name '*.java'`

after that everythings works fine for me.

Does anybody have the same problem?

Jay

[/]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
TCHsu
Offline
Joined: 2011-08-23
Points: 0

hey,
I got the same problems when executing command " ./d -prod -mac -o2 rom cldc"
about the first problem,
I downgrade the gcc version to gcc-4.4 then it solved.

the second one, "~/squawk/builder$ ./bld.sh"
I reference your solution and it solved too. Thanks a lot, it's helpful for me...

my environment:
Ubuntu 12.04 LTS (3.2.0-24-generic-pae #37-Ubuntu SMP Wed Apr 25 10:47:59 UTC 2012 i686 athlon i386 GNU/Linux)
java version "1.7.0_03" (java-7-openjdk-i386)
gcc-4.4