AOSP build hangs at the beginning of build - android-source

I am developing a system with the AOSP fork, rowboat. It was working until today, now I get this:
$ time make -j8 TARGET_PRODUCT=beagleboneblack OMAPES=4.x droid showcommands
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.2.2
TARGET_PRODUCT=beagleboneblack
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-29-generic-x86_64-with-LinuxMint-17-qiana
HOST_BUILD_TYPE=release
BUILD_ID=JDQ39
OUT_DIR=out
============================================
^CTraceback (most recent call last):
File "build/tools/findleaves.py", line 98, in <module>
main(sys.argv)
File "build/tools/findleaves.py", line 92, in main
results = list(set(perform_find(mindepth, prune, dirlist, filename)))
File "build/tools/findleaves.py", line 31, in perform_find
real 7m19.311s
user 0m0.236s
for root, dirs, files in os.walk(rootdir, followlinks=True):
sys 0m0.104s
File "/usr/lib/python2.7/os.py", line 294, in walk
atilla#atilla-vaiod$ for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
snip(this goes on so many lines).
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 284, in walk
if isdir(join(top, name)):
File "/usr/lib/python2.7/genericpath.py", line 41, in isdir
st = os.stat(s)
KeyboardInterrupt
^C

I found the problem. For some reason, the output is suppressed when the script is called from makefile. I ran the script manually, and found some recursive symlinks. Removed them and it is working again.
EDIT: Here is how I diagnosed the problem.
The build starts from build/core/main.mk, which invokes build/tools/findleaves.py. This script searches the entire source tree for files called Android.mk and stitches them together to create a temporary, gargantuan makefile.
If you start a build and cancel it by pressing Ctrl-C in the first few seconds, you will see the familiar keyboard interrupt message from Python. When I did it, the Python stack dump was several pages tall, as the script searches the directory tree recursively.
What I did was:
I added a simple print statement into the script to see what directory it scans.
This is important: I invoked the script directly, instead of through the makefile. This way, I can see its output, which would otherwise consumed by the makefile. Printing the traces to stderr instead of stdout will probably work as well.
The problem was, I created some extra subdirectories in the kernel directory to "install" modules and firmware, to make it easy for me to copy later. The make modules-install command installs a symlink back to the kernel source tree, pointing where the modules come from. So the there is a file kernel/deploy/lib/modules/3.8.13/source which is a symlink back to the kernel/ directory.
The Python script follows symlinks and tries to scan a tree with infinite depth.

Switch to python2.7 and try `

Related

command line execute .exe from it's own folder

My .exe relies on configuration and other files in it's folder.
So I'd like to start it from it's folder, but with a single line.
So instead of:
D:\APPS\Program.exe
something like:
cd D:\APPS\ Program.exe
So the root folder is D:\APPS\ instead of D:
I could make a bat file with these as separate lines.
But that's a lot of extra work.
Is there a way to execute this in a single line?

cx_freeze windows console encoding bug

I have python 3.4 script which has deal with unicode characters, diacritics and etc.
The script works perfectly on Mac and Windows.
If I freeze it to windows executable (freezing on windows!)
python cxfreeze verifier.py -cOO --target-dir verifier
and will try to run it, it will give me the following exception while performing output
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec(code, m.__dict__)
File "C:\Users\me\Desktop\verifier\verifier.py", line 520, in <module>
main()
File "C:\Users\me\Desktop\verifier\verifier.py", line 484, in main
ConsoleManager.dynamic_print(MSG_VERIFYING_FILE.format(relativePath))
File "C:\Users\me\Desktop\verifier\verifier.py", line 230, in dynamic_print
ConsoleManager.print(message, end='\r')
File "C:\Users\me\Desktop\verifier\verifier.py", line 226, in print
print(message, end=end)
File "X:\Python34-x32\lib\encodings\cp866.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\u0456' in position 16: character maps to <undefined>
I wonder why 'cp866'? The script is working with utf-8 exclusively and there were no cp866 charset references at all!
Looks like cx_Freeze is trying to print utf-8 stream to console like cp866 stream.
How can i tell to cx_Freeze exe-creator script to perform all console output in utf-8?
I will be glad to any help.
UPDATE: found http://sourceforge.net/p/cx-freeze/mailman/message/24126644/ maybe it is about encountered problem
Try to execute the following in your windows console:
chcp 65001
set PYTHONIOENCODING=utf-8

how to compile an .m file which contains calling of another .exe file inside it

I have an .m file from which I call another .exe file on my machine with "system" statement. Now, I am going to use "deploytool" to create a console application. But, running this application couldn't run the .exe file inside it. Please tell me if there is any way to resolve this problem.
More detail:
These are the files which are used by main m.file: A.txt , B.xlsx, C.exe (I have put all of them in a folder). And this is part of m.file which utilizes these file:
1- m = xlsread('B.xls');
…
12- [status,cmdout] = system('C');
After running C.exe it should output a text file called “Out.txt” and then
…
13- fileID = fopen(‘Out.txt’);
14- links = textscan(fileID, ‘%s’, 7, ‘delimiter’, ‘,’);
…
But in the resulted standalone file when it reaches to line 12, can’t run C.exe! –
Thanks in advance!

Difference between calling command line directly or from makefile

I have a confusing problem concerning mingw make and windows command line (Win7):
I have a makefile which shall call a vbs file to convert .vds files to .png files. here is the code of the makefile (without the defined variables, you can see the result in the picture below).
VSD2PNG: $(VISIO_OUTPUT)
#echo *** converting visio files to png files finished
define vsd_rule
$(1): $(call FILTER_FUNCTION,$(basename $(notdir $(1))),$(VISIO_FILES))
$(VSD_SCRIPT) $$< $(VISIO_OUTPUT_DIR)
endef
$(foreach file,$(VISIO_OUTPUT),$(eval $(call vsd_rule,$(file))))
leads to
As you can see, the command should call .\tools\visio\convert(.vbs) with two arguments (input file & output directory). Surprising is that the same command executed in windows command line works fine. I tried some modifications to solve the problem (unsuccessfully):
adding file extension to vbs-script leads to error 193, but I cannot find out, what that means.
calling the script without any arguments should lead to a runtime-error in the script, but that leads to make error -1 again (or with file extension 193).
using absolute path for script
Does anybody know more about the differences between calling a script directly from command line or from makefile, which should usually lead to the command line?

Can't exec No such file or directory

Merry Christmas to everybody. I'm having a dilemma with a perl script. In my script, I call another program with a system call, but I got this error:
Can't exec "./Classificador/svm_classify": No such file or directory at Analise_de_Sentimentos_mudanca.pl line 463.
I don't know if there is a problem in having my program in a different directory than the called program.
Another curious thing is that this script used to run normally in Ubuntu 10.10. But now I've changed to Mint 14. Is it missing some library?
Best wishes,
Thiago
The relative pathname ./Classificador/svm_classify is interpreted relative to the user's current directory, not the directory containing the perl script. You need to do one of the following:
The user must cd to the directory containing the perl script before running it.
The perl script should call chdir() to set the current directory to the directory where it's stored.
Put the absolute pathname in the script, instead of ./.
Does this "./Classificador/svm_classify" exists ?
Check the following :
1) to go the directory where this file lays - Analise_de_Sentimentos_mudanca.pl
2) run :
ll Classificador/svm_classify
3) show us the results