Aosp does not have tools/vendor/google3 project - android-studio

When I build Android Studio from source code using: 'bazel build //tools/adt/idea/...' command can't always find 'tools/vendor/google3' module, isn't google no open source project?
zhangyang#zhangyang-OptiPlex-7040:~/aosp/gradle_3.1.2$ bazel build //tools/adt/idea/...
WARNING: ignoring http_proxy in environment.
Starting local Bazel server and connecting to it...
..............................
ERROR: error loading package '': Encountered error while reading extension file 'binds.bzl': no such package '#blaze//': /home/zhangyang/.cache/bazel/_bazel_zhangyang/e54d4cb13781c1d72b64dc99700261fe/external/blaze must be an existing directory
ERROR: error loading package '': Encountered error while reading extension file 'binds.bzl': no such package '#blaze//': /home/zhangyang/.cache/bazel/_bazel_zhangyang/e54d4cb13781c1d72b64dc99700261fe/external/blaze must be an existing directory
INFO: Elapsed time: 0.621s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
the bazel WORKSPACE:
load("//tools/base/bazel:repositories.bzl", "setup_external_repositories")
setup_external_repositories()
local_repository(
name = "blaze",
path = "tools/vendor/google3/blaze",
)
load("#blaze//:binds.bzl", "blaze_binds")
blaze_binds()
http_archive(
name = "bazel_toolchains",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/b49ba3689f46ac50e9277dafd8ff32b26951f82e.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/b49ba3689f46ac50e9277dafd8ff32b26951f82e.tar.gz",
],
strip_prefix = "bazel-toolchains-b49ba3689f46ac50e9277dafd8ff32b26951f82e",
sha256 = "1266f1e27b4363c83222f1a776397c7a069fbfd6aacc9559afa61cdd73e1b429",
)
But Aosp does not have tools/vendor/google3 project

TL;DR:
bazel build is broken in AOSP
Use <studio-master-dev>/tools/idea/build_studio.sh instead
Or if you just want build a submodule inside tools/base , simply run gradle build. You might have to remove some dead dependencies from gradle.build but this shouldn't be difficult to fix.
Long version:
I had encountered the same error message, and took a look in the externaldirectory:
ls -lah ~/.cache/bazel/_bazel_xxx/89112fe8516b5fa5b01df0651312df31/external/
total 16K
drwxrwxr-x 2 xxx xxx 4.0K Dec 12 14:04 .
drwxrwxr-x 7 xxx xxx 4.0K Dec 12 14:04 ..
-rw-rw-r-- 1 xxx xxx 33 Dec 12 14:04 #bazel_tools.marker
lrwxrwxrwx 1 xxx xxx 110 Dec 12 14:04 bazel_tools -> /home/xxx/.cache/bazel/_bazel_xxx/install/35f799b1c96ee2522d30a28ff4ef485a/_embedded_binaries/embedded_tools
lrwxrwxrwx 1 xxx xxx 55 Dec 12 14:04 blaze -> /home/xxx/studio-master-dev/tools/vendor/google3/blaze
What is actually missing is /tools/vendor/google3/blaze. A quick Google search shows that blaze is an internal version of bazel, exclusively used within Google.
A thread in Android Studio's issue tracker also confirms that bazel build is broken in AOSP, with some bonus hints that build instructions in the studio-master-dev branch are all outdated (ouch). The issue is still open at the point of writing so if you are building Android Studio (or related tools), you might want to take a look at the latest discussion there.

Remove all references to tools/vendor/google from tools/base/bazel/toplevel.WORKSPACE:
https://android.googlesource.com/platform/tools/idea/+/refs/heads/studio-master-dev/RELEASE.md

Related

Fluttererror after fitebase connection

I have a really big problem after firebase and google sync
The app wont run and the error is this:
Exception in thread "main" java.lang.RuntimeException: Could not load wrapper properties from 'C:\Users\Panda-PC\AndroidStudioProjects\shop_copy\android\gradle\wrapper\gradle-wrapper.properties'.
at org.gradle.wrapper.WrapperExecutor.<init>(WrapperExecutor.java:64)
at org.gradle.wrapper.WrapperExecutor.forWrapperPropertiesFile(WrapperExecutor.java:47)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:60)
Caused by: java.lang.RuntimeException: No value with key 'distributionUrl' specified in wrapper properties file 'C:\Users\Panda-PC\AndroidStudioProjects\shop_copy\android\gradle\wrapper\gradle-wrapper.properties'.
at org.gradle.wrapper.WrapperExecutor.reportMissingProperty(WrapperExecutor.java:156)
at org.gradle.wrapper.WrapperExecutor.readDistroUrlDeprecatedWay(WrapperExecutor.java:99)
at org.gradle.wrapper.WrapperExecutor.readDistroUrl(WrapperExecutor.java:84)
at org.gradle.wrapper.WrapperExecutor.prepareDistributionUri(WrapperExecutor.java:70)
at org.gradle.wrapper.WrapperExecutor.<init>(WrapperExecutor.java:57)
... 2 more
Finished with error: Gradle task assembleProfile failed with exit code 1
I run doctor it says no issue found.
I read a lot of forum posts already, but nothing.
Also, I did this tutorial:
https://www.youtube.com/watch?v=IlgRLf-MGDM&list=PLmnT6naTGy2SC82FMSCrvZNogg5T1H7iF&index=23
#Matelevi12, seems like there is an issue with your gradle-wrapper.properties . Could your post your gradle-wrapper.properties from C:\Users\Panda-PC\AndroidStudioProjects\shop_copy\android\gradle\wrapper\gradle-wrapper.properties? It should look something like this,
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
Browse to your project folder
Android < gradle < wrapper < gradle-wrapper.properties
and make sure you have a distribution url specified for your gradle. If not specify it. Also you can copy the contents of gradle-wrapper.propeties file from another working project of yours and replace it with your current project.It won't affect your project.

Unable to Connect Sqoop to Oracle TimesTen through JDBC on Linux

I have installed Timesten database (full version) on linux (Linux is guest OS installed through Oracle viritual box with cloudera VM)
I am trying to run following sqoop command on linux and getting below errors
command
sqoop list-tables --connect jdbc:timesten:direct:dsn=sampledb_1122 --driver com.timesten.jdbc.TimesTenDriver
**error**
ERROR manager.SqlManager: Error reading database metadata: java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path
java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path
at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1809)
at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:305)
at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:161)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:878)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.listTables(SqlManager.java:520)
at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
Could not retrieve tables list from server
18/02/18 18:56:04 ERROR tool.ListTablesTool: manager.listTables() returned null
TimesTen bin and lib folder location
/home/cloudra/timesten/TimesTen/tt1122_64/bin
/home/cloudera/timesten/TimesTen/tt1122_64/lib
Following values are setup in my environment and other parameters
USERNAME=cloudera
DESKTOP_SESSION=gnome
MAIL=/var/spool/mail/cloudera
PATH=/var/lib/sqoop:/home/cloudera/timesten/TimesTen/tt1122_64/bin:/home/cloudera/timesten/TimesTen/tt1122_64/lib:/home/cloudera/anaconda3/bin:/var/lib/sqoop:/home/cloudra/timesten/TimesTen/tt1122_64/bin:/home/cloudera/timesten/TimesTen/tt1122_64/lib:/home/cloudera/anaconda3/bin:/home/cloudera/anaconda3/bin:/usr/local/firefox:/sbin:/usr/java/jdk1.7.0_67-cloudera/bin:/usr/local/apache-ant/apache-ant-1.9.2/bin:/usr/local/apache-maven/apache-maven-3.0.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/cloudera/bin
PWD=/home/cloudera
THREAD_FLAGS=native
HOME=/home/cloudera
SHLVL=2
M2_HOME=/usr/local/apache-maven/apache-maven-3.0.4
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=cloudera
CVS_RSH=ssh
CLASSPATH=/home/cloudera/timesten/TimesTen/tt1122_64/lib/ttjdbc6.jar
[cloudera#quickstart ~]$ echo $LD_LIBRARY_PATH
/home/cloudera/timesten/TimesTen/tt1122_64/lib:/home/cloudera/timesten/TimesTen/tt1122_64/lib:
[cloudera#quickstart ~]$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
[cloudera#quickstart ~]$
cloudera#quickstart bin]$ ./ttversion
TimesTen Release 11.2.2.8.0 (64 bit Linux/x86_64) (tt1122_64:53396) 2015-01-20T08:36:31Z
Instance admin: cloudera
Instance home directory: /home/cloudera/timesten/TimesTen/tt1122_64
World accessible
Daemon home directory: /home/cloudera/timesten/TimesTen/tt1122_64/info
PL/SQL enabled.
In addition to above.. the ttjdbc6.jar file is located at following location
[cloudera#quickstart sqoop]$ pwd
/var/lib/sqoop
[cloudera#quickstart sqoop]$ ls -ltr
total 0
lrwxrwxrwx 1 root root 40 Jun 9 2015 mysql-connector-java.jar -> /usr/share/java/mysql-connector-java.jar
lrwxrwxrwx 1 root root 58 Feb 16 21:37 ttjdbc6.jar -> /home/cloudera/timesten/TimesTen/tt1122_64/lib/ttjdbc6.jar
[cloudera#quickstart timesten]$ pwd
/usr/lib/timesten
[cloudera#quickstart timesten]$ ls -ltr
total 276
-rwxrwxrwx 1 root root 279580 Feb 18 11:33 ttjdbc6.jar
Java_library_path output
[cloudera#quickstart timesten]$ java -XshowSettings:properties
Property settings:
awt.toolkit = sun.awt.X11.XToolkit
file.encoding = UTF-8
file.encoding.pkg = sun.io
file.separator = /
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.printerjob = sun.print.PSPrinterJob
java.class.path = /home/cloudera/timesten/TimesTen/tt1122_64/lib/ttjdbc6.jar
java.class.version = 51.0
java.endorsed.dirs = /usr/java/jdk1.7.0_67-cloudera/jre/lib/endorsed
java.ext.dirs = /usr/java/jdk1.7.0_67-cloudera/jre/lib/ext
/usr/java/packages/lib/ext
java.home = /usr/java/jdk1.7.0_67-cloudera/jre
java.io.tmpdir = /tmp
java.library.path = /home/cloudera/timesten/TimesTen/tt1122_64/lib
/home/cloudera/timesten/TimesTen/tt1122_64/lib
/usr/java/packages/lib/amd64
/usr/lib64
/lib64
/lib
/usr/lib
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.7.0_67-b01
I execute ttenv.sh scripts but it is not setting up any parameter when I check env parameters, so I had to do it manually.
Gurus and experts.. please help me here.. not sure what is the issue and why I am getting the above error.
Thanks for your help..
The key line here is this:
java.sql.SQLException: Problems with loading native library/missing methods:
no ttJdbc in java.library.path
The TimesTen JDBC driver is a type 1 / 2 driver and it relies on the underlying TimesTen native libraries. Specifically it needs several shared libraries located in <TimesTen_install_dir>/lib such as libttJdbc.so (the one that the error is complaining about), libtten.so etc. Typically you need to make sure that the java.library.path includes this directory (which it appears is the case) and that the CLASSPATH includes the ttjdbc7.jar file in that directory. Another possibility is that your TimesTen installation is a 'client only' installation in which case you cannot use the 'direct' driver and if you try to do so then you would get this exact error. I suggest checking to see if you actually have the files libttJdbc.so and libtten.so in <TimesTen_install_dir>/lib and if not, then this means you have a client only install and need to configure / use client/server connectivity instead.

Submitting first job to pacemaker

I followed this guide:
https://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Clusters_from_Scratch/
I stayed with the Active/Passive DRBD file system sharing. I had to reboot my cluster and now I am getting the following error:
Current DC: rbx-1 (version 1.1.16-12.el7_4.4-94ff4df) - partition with quorum
Last updated: Tue Nov 28 17:01:14 2017
Last change: Tue Nov 28 16:40:09 2017 by root via cibadmin on rbx-1
2 nodes configured
5 resources configured
Node rbx-2: UNCLEAN (offline)
Online: [ rbx-1 ]
Full list of resources:
ClusterIP (ocf::heartbeat:IPaddr2): Started rbx-1
WebSite (ocf::heartbeat:apache): Stopped
Master/Slave Set: WebDataClone [WebData]
WebData (ocf::linbit:drbd): FAILED rbx-1 (blocked)
Stopped: [ rbx-2 ]
WebFS (ocf::heartbeat:Filesystem): Stopped
Failed Actions:
* WebData_stop_0 on rbx-1 'invalid parameter' (2): call=20, status=complete, exitreason='none',
last-rc-change='Tue Nov 28 16:27:58 2017', queued=0ms, exec=3ms
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
Any ideas?
Also does anyone have any recommended guides for submitting jobs?
This post is relatively old at this point but I'll leave this here for others to find if they stumble upon the same issue.
This problem has to do with an issue with the DRBD integration script that pacemaker uses. If it's broken, missing, has incorrect permissions, etc. you can get an error like this. In CentOS 7 that script is located at /usr/lib/ocf/resource.d/drbd
Note: This is specifically for the guide mentioned by OP but may help you:
Section 7.1 has a big "IMPORTANT" block that talks about replacing the Pacemaker integration script due to a bug. If you use the command it tells you to there, you actually replace the script with a 404 Error page which obviously doesn't work, causing the error. You can fix this issue by replacing the script with the original, either by reinstalling DRBD...
yum remove -y kmod-drbd84 drbd84-utils
yum install -y kmod-drbd84 drbd84-utils
...or finding just the drbd script elsewhere and adding/replacing it to /usr/lib/ocf/resource.d/drbd. Make sure its permissions are correct and that it is set as executable.
Hope that helps!

Getting NPM error: "Resolving deps of app\app.ts failed."

I'm trying to install and utilize this brunch.io skeleton. I keep running into this error:
20 Apr 19:40:21 - info: application started on http://localhost:3333/
20 Apr 19:40:24 - info: compiling
20 Apr 19:40:28 - error: Resolving deps of app\app.ts failed. Could not load module 'app\home' from 'C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app'. Possible solution: add 'app' to package.json and `npm install`.
20 Apr 19:40:28 - error: Resolving deps of app\about\index.ts failed. Could not load module 'app\about\about.tpl' from 'C:\Users\tyler.WORKGROUP\Documents\GitHub\zenith-folio\app\about'. Possible solution: add 'app' to package.json and `npm install`.
20 Apr 19:40:28 - info: compiling.
20 Apr 19:40:29 - info: compiled 477 files into 2 files, copied index.html in 8.4 sec
I'm trying my best to understand what's going on here, but I'm not sure. I can see that I need to add "app" to package.json, but I don't know how or which "app" it's specifying. Is it talking about:
the folder called "app"
a file called app.ts
Or is there something else I'm missing?
Message is pretty clear: Could not load module 'app\home', it means that you have unresolved import in app.ts which possibly looks like import ... from 'app\home';

Issue when deploying Yesod 1.4 to Heroku

im having a problem when deploying a new Yesod application to heroku. I am following the steps here;
https://github.com/yesodweb/yesod/wiki/Deploying-Yesod-Apps-to-Heroku
But since yesod 1.4 was released, I am getting the following issue show up in my logs (PaperTrail);
Dec 21 04:42:51 fxtest heroku/web.1: Starting process with command ./dist/build/fxtest/fxtest production -p 37347
Dec 21 04:42:52 fxtest app/web.1: loadAppSettings: Could not parse file as YAML: production
Dec 21 04:42:52 fxtest app/web.1: fxtest: InvalidYaml (Just (YamlException "Yaml file not found: production"))
Dec 21 04:42:53 fxtest heroku/web.1: Process exited with status 1
Dec 21 04:42:53 fxtest heroku/web.1: State changed from starting to crashed
This appears to say that I have a missing yaml file called "production". If I try to negate this error by adding a dummy yaml file, then I get a similar error telling me I am missing a file called "-p". This leads me to think that the issue is being caused by my Procfile, which only contains one line;
web: ./dist/build/fxtest/fxtest production -p $PORT
thanks in advance for any help
If you're using the new scaffolding, it no longer requires the command line parameter. Try dropping production from the command, and probably leave of the-p $PORT as well.

Resources