(flow) lab#lab-500-471cn:~/flow/examples/sumo$ python highway_ramps.py
netconvert: symbol lookup error: netconvert: undefined symbol: _ZN10OGRFeature16GetFieldAsStringEi
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Error during start: [Errno 2] No such file or directory: '/home/lab/flow/flow/core/kernel/network/debug/cfg/highway-ramp_20191106-1018371573006717.6494718.net.xml'
Retrying in 1 seconds...
Traceback (most recent call last):
File "highway_ramps.py", line 115, in
exp = highway_ramps_example()
File "highway_ramps.py", line 109, in highway_ramps_example
env = AccelEnv(env_params, sim_params, network)
File "/home/lab/flow/flow/envs/ring/accel.py", line 80, in init
super().init(env_params, sim_params, network, simulator)
File "/home/lab/flow/flow/envs/base.py", line 158, in init
self.k.network.generate_network(self.network)
File "/home/lab/flow/flow/core/kernel/network/traci.py", line 146, in generate_network
connections
File "/home/lab/flow/flow/core/kernel/network/traci.py", line 531, in generate_net
raise error
TypeError: exceptions must derive from BaseException
Thanks very much!
I had the same problem when following the local installation of Flow instructions instructions on Ubuntu 19.10. The problem seems to come from the pre-compiled binaries. To solve the problem, I compiled and installed SUMO by following the instructions in (Optional) Direct install of SUMO from GitHub.
I had the same problem on Ubuntu 18.04... with Sumo installed from sources available from Flow repo
After some searching, it was apparent that the 'net' file was not getting created because the Flow installation directory 'path name' had white spaces in my instance. Therefore, I modified the traci.py file from below Line 510 as below (NOTE: some debugging code is also there for easy observation of output) and with some changes in the variables inside the 'subprocess.call' invocation
final_net_path = "\'"+self.net_path+self.cfgfn+"\'"
final_cfg_path = "\'"+self.cfg_path+self.netfn+"\'"
#added by me
print("netpath =",self.net_path)
print("cfgpath =",self.cfg_path)
print("netfn =",self.netfn)
print("cfgfn =",self.cfgfn)
subprocess.call(
[
'netconvert -c ' + final_net_path +
' --output-file=' + final_cfg_path +
' --no-internal-links="false"'
],
stdout=subprocess.DEVNULL,
shell=True)
The rest of the code section remains intact...
Hope this helps!
NOTE: The traci.py file is located in your flow directory's /flow/core/kernel/network path
Related
I am trying to cross build chromium on mac host. I have followed the instructions from https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/win_cross.md and everything seems fine. But when I run autoninja -C out/win chrome I face with the following error. Any help would be appreciated.
ninja: Entering directory `out/win'
[0/1] Regenerating ninja files
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
^----------
Current dir: /chromium/src/out/win/
Command: python3 /chromium/src/build/vs_toolchain.py get_toolchain_dir
Returned 1.
stderr:
Traceback (most recent call last):
File "/chromium/src/build/vs_toolchain.py", line 587, in <module>
sys.exit(main())
File "/chromium/src/build/vs_toolchain.py", line 583, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "/chromium/src/build/vs_toolchain.py", line 561, in GetToolchainDir
win_sdk_dir = SetEnvironmentAndGetSDKDir()
File "/chromium/src/build/vs_toolchain.py", line 554, in SetEnvironmentAndGetSDKDir
return NormalizePath(os.environ['WINDOWSSDKDIR'])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'WINDOWSSDKDIR'
See //third_party/angle/gni/angle.gni:35:5: whence it was imported.
import("//build/config/win/visual_studio_version.gni")
^----------------------------------------------------
See //chrome/elevation_service/BUILD.gn:7:1: whence it was imported.
import("//build/toolchain/win/midl.gni")
^--------------------------------------
See //BUILD.gn:660:7: which caused the file to be included.
"//chrome/elevation_service:elevation_service_unittests",
^-------------------------------------------------------
FAILED: build.ninja
../../buildtools/mac/gn --root=../.. -q --ide=vs --regeneration gen .
ninja: error: rebuilding 'build.ninja': subcommand failed
I'm trying to compile CEF locally on my Ubuntu 20.10 machine, but my automate-git.py can't finish due to a strange error while running hooks:
Apply runhooks.patch in /home/user/code/chromium_git/chromium/src
9 5 build/toolchain/win/setup_toolchain.py
11 0 build/vs_toolchain.py
... successfully applied.
-------- Running "gclient runhooks --jobs 16" in "/home/user/code/chromium_git/chromium"...
Running hooks: 5% ( 6/101) nacltools
________ running 'vpython src/build/download_nacl_toolchains.py --mode nacl_core_sdk sync --extract' in '/home/user/code/chromium_git/chromium'
INFO: --Syncing arm_trusted to revision 2--
INFO: Downloading package archive: emulator_arm_trusted_precise.tgz (1/1)
package_version: Could not download URL (https://storage.googleapis.com/nativeclient-archive2/toolchain/2/emulator_arm_trusted_precise.tgz): <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>
Error: Command 'vpython src/build/download_nacl_toolchains.py --mode nacl_core_sdk sync --extract' returned non-zero exit status 1 in /home/user/code/chromium_git/chromium
Traceback (most recent call last):
File "../automate/automate-git.py", line 1385, in <module>
run("gclient runhooks --jobs 16", chromium_dir, depot_tools_dir)
File "../automate/automate-git.py", line 69, in run
return subprocess.check_call(
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'runhooks', '--jobs', '16']' returned non-zero exit status 2.
On the restart it it succeeds, though, but there are compilation errors in future. I pasted check_certificate = off in ~/.wgetrc and insecure in ~/.curlrc, but no luck yet. What do I do?
I solved this issue by setting up a VM and compiling CEF inside it, and it all magically started working, so I guess it was my system's issue.
Followed steps provided in this web page https://webrtc.org/native-code/android/
When I executed command "ninja -C out/Debug AppRTCMobile" I got following response
ninja: Entering directory `out/Debug'
ninja: fatal: chdir to 'out/Debug' - No such file or directory
I got stuck here and need help to continue in executing the next steps to complete the code setup.
Ubuntu version - 16.04.2
I have followed the same procedure once again to setup the code. This time I got a new error
Steps:
-> fetch --nohooks webrtc_android
-> gclient sync
-> gn gen out/Debug --args='target_os="android" target_cpu="arm"'
-> ninja -C out/Debug
ninja: Entering directory `out/Debug'
[1/8508] ACTION
//base:android_runtime_jni_headers__jni_Runtime(//build/toolchain/android:android_clang_arm)
FAILED: gen/android_runtime_jni_headers/base/jni/Runtime_jni.h python
../../base/android/jni_generator/jni_generator.py --depfile
gen/base/android_runtime_jni_headers__jni_Runtime.d --jar_file
../../third_party/android_tools/sdk/platforms/android-26/android.jar
--input_file java/lang/Runtime.class --ptr_type=long --output_dir gen/android_runtime_jni_headers/base/jni --includes
../../../../../../base/android/jni_generator/jni_generator_helper.h
--native_exports_optional
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1428,
in
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1421,
in main
GenerateJNIHeader(input_file, output_file, options) File "../../base/android/jni_generator/jni_generator.py", line 1326, in
GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options)
File "../../base/android/jni_generator/jni_generator.py", line 662,
in CreateFromClass
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in
_execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[3/8508] CC obj/third_party/boringssl/boringssl/v3_ncons.o
ninja: build stopped: subcommand failed.
Someone please help me in resolving this issue.
You have to generate the projects using GN before trying to compile. You have the instructions here:
https://webrtc.org/native-code/android/
Buildroot version: 2017-02
I need to integrate python package 'chardet' to my build. The chardet require the 'pytest-runner'package.
Case 1
The 'chardet' is marked to be integrated into build. The 'pytest-runner' is not pre-feteched and the 'chardet' package updated to the latest version (3.0.3) before the build with the scanpypi script. When the make is run the following error message is shown indicating problems with the 'pytest-runner':
>>> python-chardet 3.0.3 Building
(cd /home/nnnn/bldr_lab/buildroot/output/build/python-chardet-3.0.3//;
PATH="/home/nnnn/bldr_lab/buildroot/output/host/bin:/home/nnnn/bldr_lab
/buildroot/output/host/sbin:/home/nnnn/bldr_lab/buildroot/output/host/usr
/bin:/home/nnnn/bldr_lab/buildroot/output/host/usr/sbin:/home/nnnn/x-tools
/arm-cortex_a8-linux-gnueabihf/bin:/home/nnnn/bin:/home/nnnn/.local
/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr
/games:/usr/local/games" PYTHONPATH="/home/nnnn/bldr_lab/buildroot/output
/target/usr/lib/python2.7/sysconfigdata/:/home/nnnn/bldr_lab/buildroot
/output/target/usr/lib/python2.7/site-packages/" _python_sysroot=/home
/nnnn/bldr_lab/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf
/sysroot _python_prefix=/usr _python_exec_prefix=/usr /home/nnnn/bldr_lab
/buildroot/output/host/usr/bin/python setup.py build )
Download error on https://pypi.python.org/simple/pytest-runner/: unknown
url type: https -- Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: unknown url type: https
-- Some packages may not be found!
No local packages or download links found for pytest-runner
Traceback (most recent call last):
File "setup.py", line 52, in <module>
['chardetect = chardet.cli.chardetect:main']})
File "/home/nnnn/bldr_lab/buildroot/output/host/usr/lib/python2.7
/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 268, in
__init__
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 313, in
fetch_build_eggs
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 846, in resolve
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1091, in best_match
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 1103, in obtain
File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 380, in fetch_build_egg
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 633, in easy_install
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
package/pkg-generic.mk:216: recipe for target '/home/nnnn/bldr_lab
/buildroot/output/build/python-chardet-3.0.3/.stamp_built' failed
make[1]: *** [/home/nnnn/bldr_lab/buildroot/output/build/python-chardet-
3.0.3/.stamp_built] Error 1
Makefile:79: recipe for target '_all' failed
make: *** [_all] Error 2
case 2 When I try to create the 'pytest-runner' with the scanpypi the following error message is shown:
nnnn#xxxx:~/bldr2/buildroot$ ./support/scripts/scanpypi pytest-runner -o package
buildroot package name for pytest-runner: python-pytest-runner
Package: python-pytest-runner
Fetching package pytest-runner
Downloading package pytest-runner from https://pypi.python.org/packages/9e/4d/08889e5e27a9f5d6096b9ad257f4dea1faabb03c5ded8f665ead448f5d8a/pytest-runner-2.11.1.tar.gz...
Error: Could not install package pytest-runner
When I download the 'pytest-runner-2.11.1.tar.gz' from pypi manually it looks as normal pypi tar file. Any idea what is root cause and how to solve the problem?
-timo-
I am trying to add a static library to a titanium iphone module i have created, and it seems that whenever i add the library to the "Link binary with libraries", and use titanium run titanium returns the following error:
[ERROR] Error: Traceback (most recent call last):
[DEBUG] File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1148, in main
[DEBUG] execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s" % (log_id,sdk_version,debugstr)],False)
[DEBUG] File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1066, in execute_xcode
[DEBUG] output = run.run(args,False,False,o)
[DEBUG] File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/run.py", line 39, in run
[DEBUG] sys.exit(rc)
[DEBUG] SystemExit: 65
[ERROR] Build Failed. See: /var/folders/ot/ot5FPlA3EZyk6n8ZnYeWxk+++TI/-Tmp-/m9mX89ati/test2/build/iphone/build/build.log
build.log shows:
** BUILD FAILED **
The following build commands failed:
Ld build/Debug-iphonesimulator/test2.app/test2 normal i386
(1 failure)
EXIT CODE WAS: 65
Exception detected in script:
Traceback (most recent call last):
File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1148, in main
execute_xcode("iphonesimulator%s" % link_version,["GCC_PREPROCESSOR_DEFINITIONS=__LOG__ID__=%s DEPLOYTYPE=development TI_DEVELOPMENT=1 DEBUG=1 TI_VERSION=%s %s" % (log_id,sdk_version,debugstr)],False)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/builder.py", line 1066, in execute_xcode
output = run.run(args,False,False,o)
File "/Library/Application Support/Titanium/mobilesdk/osx/1.7.2/iphone/run.py", line 39, in run
sys.exit(rc)
SystemExit: 65
I'm desperate, anyone help?
Thank you!
take a look at this section of the documentation
http://wiki.appcelerator.org/display/guides/Module+Developer+Guide+for+iOS#ModuleDeveloperGuideforiOS-AddingSpecialCompilerDirectives
add this line to the module.xcconfig
OTHER_LDFLAGS=$(inherited) -framework GameKit
where GameKit is your missing framework that is used in your library.