Discussion:
Error when trying to build from source
Marcelo
2008-10-21 20:33:20 UTC
Permalink
Hi,

I followed the instructions on the web page in order to construct a
source code directory. When trying to build, I get:

frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:5:
package com.google.common does not exist

Is something missing from the source or do I have to "repo sync"?

Thanks!

Marcelo
Marcelo
2008-10-21 22:25:44 UTC
Permalink
Hi,

follow up on my own post...

The actual list of errors follows.

Marcelo

target Java: framework
(out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes)
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:5:
package com.google.common does not exist
import com.google.common.Config;
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:6:
package com.google.common.android does not exist
import com.google.common.android.AndroidConfig;
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:8:
package com.google.masf does not exist
import com.google.masf.MobileServiceMux;
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:9:
package com.google.masf does not exist
import com.google.masf.ServiceCallback;
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:10:
package com.google.masf.protocol does not exist
import com.google.masf.protocol.PlainRequest;
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:11:
package com.google.masf.protocol does not exist
import com.google.masf.protocol.Request;
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:5:
cannot find symbol
symbol : class GoogleHttpConnection
location: package com.google.common.io
import com.google.common.io.GoogleHttpConnection;
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:7:
package com.google.masf does not exist
import com.google.masf.ServiceCallback;
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:8:
package com.google.masf.protocol does not exist
import com.google.masf.protocol.Request;
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:9:
package com.google.masf.protocol does not exist
import com.google.masf.protocol.Response;
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:10:
package com.google.masf.services does not exist
import com.google.masf.services.AsyncResult;
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:23:
package Request does not exist
public class ProtoRequestListener implements Request.Listener {
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:25:
cannot find symbol
symbol : class AsyncResult
location: class com.android.internal.location.ProtoRequestListener
private AsyncResult result;
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:31:
cannot find symbol
symbol : class AsyncResult
location: class com.android.internal.location.ProtoRequestListener
public AsyncResult getAsyncResult() {
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:41:
cannot find symbol
symbol : class ServiceCallback
location: class com.android.internal.location.ProtoRequestListener
public ProtoRequestListener(ProtoBuf protoResponse,
ServiceCallback callback) {
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:46:
cannot find symbol
symbol : class Request
location: class com.android.internal.location.ProtoRequestListener
public boolean requestComplete(Request request, Response response)
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:46:
cannot find symbol
symbol : class Response
location: class com.android.internal.location.ProtoRequestListener
public boolean requestComplete(Request request, Response response)
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:58:
cannot find symbol
symbol : class Request
location: class com.android.internal.location.ProtoRequestListener
public void requestException(Request request, Exception exception) {
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:136:
cannot find symbol
symbol : class MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux mux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:136:
cannot find symbol
symbol : variable MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux mux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:138:
cannot find symbol
symbol : class AndroidConfig
location: class com.android.internal.location.LocationMasfClient
AndroidConfig config = new AndroidConfig(context);
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:138:
cannot find symbol
symbol : class AndroidConfig
location: class com.android.internal.location.LocationMasfClient
AndroidConfig config = new AndroidConfig(context);
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:139:
cannot find symbol
symbol : variable Config
location: class com.android.internal.location.LocationMasfClient
Config.setConfig(config);
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:141:
cannot find symbol
symbol : variable MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux.initialize
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:304:
cannot find symbol
symbol : class Request
location: class com.android.internal.location.LocationMasfClient
Request plainRequest =
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:305:
cannot find symbol
symbol : class PlainRequest
location: class com.android.internal.location.LocationMasfClient
new PlainRequest(REQUEST_QUERY_LOC, (short)0,
payload.toByteArray());
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:307:
cannot find symbol
symbol : class ServiceCallback
location: class com.android.internal.location.LocationMasfClient
ProtoRequestListener listener = new
ProtoRequestListener(reply, new ServiceCallback() {
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:318:
cannot find symbol
symbol : class MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:318:
cannot find symbol
symbol : variable MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:525:
cannot find symbol
symbol : class Request
location: class com.android.internal.location.LocationMasfClient
Request plainRequest =
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:526:
cannot find symbol
symbol : class PlainRequest
location: class com.android.internal.location.LocationMasfClient
new PlainRequest(REQUEST_QUERY_LOC, (short)0,
payload.toByteArray());
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:531:
cannot find symbol
symbol : class MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:531:
cannot find symbol
symbol : variable MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:664:
cannot find symbol
symbol : class Request
location: class com.android.internal.location.LocationMasfClient
Request plainRequest =
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:665:
cannot find symbol
symbol : class PlainRequest
location: class com.android.internal.location.LocationMasfClient
new PlainRequest(REQUEST_QUERY_LOC, (short)0,
payload.toByteArray());
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:670:
cannot find symbol
symbol : class MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:670:
cannot find symbol
symbol : variable MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:869:
cannot find symbol
symbol : class Request
location: class com.android.internal.location.LocationMasfClient
Request plainRequest =
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:870:
cannot find symbol
symbol : class PlainRequest
location: class com.android.internal.location.LocationMasfClient
new PlainRequest(REQUEST_UPLOAD_LOC, (short)0,
payload.toByteArray());
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:872:
cannot find symbol
symbol : class ServiceCallback
location: class com.android.internal.location.LocationMasfClient
ProtoRequestListener listener = new
ProtoRequestListener(reply, new ServiceCallback() {
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:913:
cannot find symbol
symbol : class MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/LocationMasfClient.java:913:
cannot find symbol
symbol : variable MobileServiceMux
location: class com.android.internal.location.LocationMasfClient
MobileServiceMux serviceMux = MobileServiceMux.getSingleton();
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:42:
cannot find symbol
symbol : class AsyncResult
location: class com.android.internal.location.ProtoRequestListener
this.result = new AsyncResult(callback);
^
frameworks/base/location/java/com/android/internal/location/ProtoRequestListener.java:49:
cannot find symbol
symbol : variable GoogleHttpConnection
location: class com.android.internal.location.ProtoRequestListener
if (response.getStatusCode() == GoogleHttpConnection.HTTP_OK) {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
44 errors
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar]
Error 41
Marcelo
2008-10-22 03:02:47 UTC
Permalink
Post by Marcelo
follow up on my own post...
And another one...

I see com.google.common.Config lives in
external/googleclient/googleclient-lib.jar; I also see that this is
(re)packed to out/target/common/obj/JAVA_LIBRARIES/libgoogleclient_intermediates/javalib.jar

When running "make showcommands", I see the command that fails:

javac -J-Xmx256m -target 1.5 -Xmaxerrs 9999999 -encoding ascii
-bootclasspath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar
-classpath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar:out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar
-g -extdirs "" -d
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes
\@out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes/java-source-list-uniq

Am I right when I say that googleclient's content should be added to
out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar

When I examine the content of that last file I don't see Config.class in there.

Am I on the right path?

Marcelo
allstars
2008-10-22 09:57:43 UTC
Permalink
hi Marcelo
where is your Makefile?
where can i get it?
i got many Android.mk in projects directory
but no Makefile in root dir

thanks
Post by Marcelo
 follow up on my own post...
And another one...
I see com.google.common.Config lives in
external/googleclient/googleclient-lib.jar; I also see that this is
(re)packed to out/target/common/obj/JAVA_LIBRARIES/libgoogleclient_intermediates/javalib.jar
javac -J-Xmx256m -target 1.5 -Xmaxerrs 9999999 -encoding ascii
-bootclasspath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar
-classpath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar:out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar
-g  -extdirs "" -d
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes
Am I right when I say that googleclient's content should be added to
out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar
When I examine the content of that last file I don't see Config.class in there.
Am I on the right path?
Marcelo
Marcelo
2008-10-22 17:14:20 UTC
Permalink
Post by allstars
hi Marcelo
where is your Makefile?
There's a top-level Makefile that gets placed there the first time you
do a "repo sync". It's a copy of build/core/root.mk. Make sure your
"repo sync" finished running successfully.

Marcelo
Rob Franz
2008-10-22 20:28:16 UTC
Permalink
I ran into this as well. What happened was that I had kicked off a
build but I interrupted it. When I ran make again, I got these
com.google.common missing error messages.

I did a make clean, then make, and it started the build again. It
just completed.

Your mileage may vary but at least try to make clean and then restart.

Hope this helps.

-rob
Post by Marcelo
Post by allstars
hi Marcelo
where is your Makefile?
There's a top-level Makefile that gets placed there the first time you
do a "repo sync".  It's a copy of build/core/root.mk.  Make sure your
"repo sync" finished running successfully.
Marcelo
DrTune@gNOSPAMTHXmail.com
2008-10-22 21:18:23 UTC
Permalink
I just did as you suggested ( unpacked ext_intermediates/classes.jar
and repacked it with the libgoogle stuff merged int) and is now
building past that point ok, let's hope it finishes.
This is obviously a terrible hack, but picking through the build
system to find the problem will take forever.
Hm... anyway, right now it's still building...
DrTune
Post by Marcelo
 follow up on my own post...
And another one...
I see com.google.common.Config lives in
external/googleclient/googleclient-lib.jar; I also see that this is
(re)packed to out/target/common/obj/JAVA_LIBRARIES/libgoogleclient_intermediates/javalib.jar
javac -J-Xmx256m -target 1.5 -Xmaxerrs 9999999 -encoding ascii
-bootclasspath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar
-classpath out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar:out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar
-g  -extdirs "" -d
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes
Am I right when I say that googleclient's content should be added to
out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar
When I examine the content of that last file I don't see Config.class in there.
Am I on the right path?
Marcelo
Marcelo
2008-10-22 21:41:51 UTC
Permalink
Post by ***@gNOSPAMTHXmail.com
I just did as you suggested ( unpacked ext_intermediates/classes.jar
and repacked it with the libgoogle stuff merged int) and is now
building past that point ok, let's hope it finishes.
This is obviously a terrible hack, but picking through the build
system to find the problem will take forever.
Oddly enough, the person I'm working with on this reports that
rebuilding the development tree from scratch fixes the issue for him.
My hunch is that this has something to do with wrong timestamps.

When did you create your development directory? Yesterday? Today?

Marcelo
2***@gmail.com
2008-10-23 06:55:51 UTC
Permalink
I ran into the problem on a fresh installed minimal ubuntu system just
now.
It turned out it's caused by lack of unzip. If your system doesn't
have
"unzip" installed, rebuild from scratch doesn't help.
Post by Marcelo
Post by ***@gNOSPAMTHXmail.com
I just did as you suggested ( unpacked ext_intermediates/classes.jar
and repacked it with the libgoogle stuff merged int) and is now
building past that point ok, let's hope it finishes.
This is obviously a terrible hack, but picking through the build
system to find the problem will take forever.
Oddly enough, the person I'm working with on this reports that
rebuilding the development tree from scratch fixes the issue for him.
My hunch is that this has something to do with wrong timestamps.
When did you create your development directory?  Yesterday?  Today?
Marcelo
Androidcn.org
2008-10-23 09:43:30 UTC
Permalink
http://code.google.com/p/google-collections/downloads/list
and even the libraries of android SDK may help to solve this problem
Post by 2***@gmail.com
I ran into the problem on a fresh installed minimal ubuntu system just
now.
It turned out it's caused by lack of unzip. If your system doesn't
have
"unzip" installed, rebuild from scratch doesn't help.
Post by Marcelo
Post by ***@gNOSPAMTHXmail.com
I just did as you suggested ( unpacked ext_intermediates/classes.jar
and repacked it with the libgoogle stuff merged int) and is now
building past that point ok, let's hope it finishes.
This is obviously a terrible hack, but picking through the build
system to find the problem will take forever.
Oddly enough, the person I'm working with on this reports that
rebuilding the development tree from scratch fixes the issue for him.
My hunch is that this has something to do with wrong timestamps.
When did you create your development directory?  Yesterday?  Today?
Marcelo
Loading...