I want to specify a ASAN suppression file in .bazelrc. And the suppression file is located in workspace directory. I tried as following:
build:debug --action_env=LSAN_OPTIONS=suppressions=${workspace}/asan_leaks.supp
and
build:debug --action_env=LSAN_OPTIONS=suppressions=%workspace%/asan_leaks.supp
But what I got is:
AddressSanitizer: failed to read suppressions file
'/projects/mytest/bazel-output/execroot/mytest/bazel-out/aarch64-dbg/bin/mytest/${workspace}/asan_leaks.supp'
and
AddressSanitizer: failed to read suppressions file
'/projects/mytest/bazel-output/execroot/mytest/bazel-out/aarch64-dbg/bin/mytest/%workspace%/asan_leaks.supp'
It works if I hardcoded an absolute path, so I try to get the absolute path of workspace. Any suggestions are welcome, thanks.
Just update my workaround in case that somebody encouter similar issue:
Hardcode the suppression file with absolute path as following:
build:debug --action_env=suppressions=/tmp/asan_leaks.supp
Specify workspace_status_command relative to workspace directory
build --workspace_status_command=./bazel/cmd.sh
Make soft link to the suppression file in cmd.sh
bazel_dir=$(dirname -- "$(readlink -f $0;)")
ln -sf ${bazel_dir}/asan_leaks.supp /tmp/asan_leaks.supp
Related
I run a program which gives me error ./main: error while loading shared libraries: libwx_gtk2u_core-3.1.so.3: cannot open shared object file: No such file or directory
I have a libwx_gtk2u_core-2.8.so file to which I am setting the path in ~./bashrc file by adding the following two lines `
> $LD_LIBRARY_PATH:"/home/saad/PathFiles"
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
When I open the terminal again I get the error bash: :/home/saad/PathFiles: No such file or directory even though libwx_gtk2u_core-2.8.so is present in the PathFiles folder. Even after doing sudo ldconfig I get the No such file or directory error.
Your first line uses wrong syntax. If your libwx_*.so files are actually in /home/saad/PathFiles, you should just do
export LD_LIBRARY_PATH=/home/saad/PathFiles
or, if you have an existing LD_LIBRARY_PATH value
export LD_LIBRARY_PATH=/home/saad/PathFiles:$LD_LIBRARY_PATH
You can also use ldd ./main to check whether all the dependencies are found.
Having a nightmare including an svg file in my document. It's just a picture of Tux.
Code:
\svgpath{{C:/Users/me/Google\ Drive/foo}}
\includesvg[width = 200pt]{tux}
Error:
** (inkscape.exe:27228): WARNING **: 20:52:43.840: Can't open file: tux.svg (doesn't exist)
** (inkscape.exe:27228): WARNING **: 20:52:43.840: Can't open file: tux.svg (doesn't exist)
** (inkscape.exe:27228): WARNING **: 20:52:43.840: Specified document tux.svg cannot be opened (does not exist or not a valid SVG file)
The system cannot find the file specified.
The system cannot find the file specified.
I wish it would give me more debugging information so I could tell what directory is being used. I've enabled --shell-escape. I've tried various combinations with no success.
EDIT: Minimal example
\documentclass{article}
\usepackage{svg}
\begin{document}
\includesvg{tux}
\end{document}
I created a directory c:\latex
My command line is texify --pdf --engine=luatex --synctex=1 --tex-option=--shell-escape --clean foo
I noticed that it also says there's a log file, but I cannot find a log file with more information
Package svg Warning: The export with Inkscape failed for file
(svg) `tux.svg'
(svg) Troubleshooting: Please check in the log file how
(svg) the invocation of Inkscape took place and try to
(svg) execute it yourself in the terminal on input line 5.
I would love to get my hands on that mythical log file. There's a foo.log file but that just says what my console output was. There's another log file at C:\Users\james\AppData\Local\MiKTeX\2.9\miktex\log\texify.log, but that doesn't have any information about the inkscape command either.
The docs (http://mirror.its.dal.ca/ctan/graphics/svg/doc/svg.pdf) say that I should see runsystem ....
The problem is the --clean option. I figured this out by selected pdflatex in TeXWorks and it suddenly built. Taking out options one by one helped me get to the bottom of this. Going back to post on some other questions.
As #samcarter pointed out, if you don't have to use texify, try not to. One of my packages requires LuaLaTex to typeset, so I selected the LuaLaTeX +MakeIndex +BibTex when I only needed the LuaLaTex plain option. Using that one fixed the issue.
If you have to use texify, though, try removing the --clean.
I downloaded the zbar library and cloned the opencv-zbar repo in my home directory. Then I ran the following command $cmake . which gave my the error
-- Could NOT find ZBAR (missing: ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZBAR_LIBRARIES
linked by target "zbar_opencv" in directory /home/surabhi/opencv-zbar
-- Configuring incomplete, errors occurred!
See also "/home/surabhi/opencv-zbar/CMakeFiles/CMakeOutput.log".
I then made two changes in my CMakeCache.txt as follows
//Path to a file.
ZBAR_INCLUDE_DIR:PATH=/usr/include/zbar
//Path to a library.
ZBAR_LIBRARIES:FILEPATH=/usr/lib/libzbar.so
because the were set to NOTFOUND.
It then gave me no errors
-- Found ZBAR: /usr/lib/libzbar.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/surabhi/opencv-zbar
But when I run make
It gives the error:
fatal error: zbar.h: No such file or directory
#include <zbar.h>
^
compilation terminated.
I don't understand why I get this error as It says Found ZBAR when I run cmake.
Thanks in advance
You need to do actually use the include dirs somewhere in your CMakeLists.txt so CMake knows that you actually want to use these include paths.
Examples:
include_directories(${ZBAR_INCLUDE_DIR})
Or the more modern, recommended way:
target_include_directories(zbar_opencv PRIVATE ${ZBAR_INCLUDE_DIR})
When I make a new framework with aggregate to generate universal framework , but a error present , as follow :
cp: build/Release-iphoneos/TEST.framework/: No such file or directory
fatal error: lipo: can't open input file: build/Release-iphoneos/TEST.framework/TEST (No such file or directory)
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
And here is a screenshot of the error:
This is a new target , I only want to test generate framework , but fail!
As the error message said, no TEST.framework can be found in the path <PROJECT_DIR>/build/Release-iphoneos/TEST.framework.
You need to check the script you use, or the blog post which you reference is out-date.
First you should build the target specified in xcodebuild command directly to see if it can build succeed.
Check what the actual build path is. If the path(build/) is not exist, you can try to specified the build path for xcodebuild, OBJROOT=${WRK_DIR} SYMROOT=${WRK_DIR}
Part of my build process is to create a tar file of an input directory, located at src/bundle/bundle. In src/bundle/SConscript:
Import('*')
bundleDir = Dir("bundle")
jsontar = Command("bundle.tar", bundleDir,
"/home/dbender/bin/mkvgconf $SOURCE $TARGET")
in my SConstruct:
SConscript(Split('src/bundle/SConscript'),
exports='bin_env lib_env', build_dir='tmp/bundle')
When attempting to build:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/home/dbender/bin/mkvgconf tmp/bundle/bundle tmp/bundle/bundle.tar
Input directory tmp/bundle/bundle not found!
scons: *** [tmp/bundle/bundle.tar] Error 1
scons: building terminated because of errors.
Clearly scons is not copying the src/bundle/bundle to tmp/bundle/bundle, but I am stumped as to why.
Footnotes:
Using absolute pathname for mkvgconf is bad practice but just intermediate until I have this problem solved.
SCons doesn't know anything about the contents of your input src/bundle/bundle - only the program mkvgconf knows what it does with that directory.
One solution is to add an explicit dependency in the SConscript:
import os
Depends('bundle.tar', Glob(str(bundleDir) + os.path.sep + '*'))
That also means that when you update the contents of the bundle directory, the mkvgconf script will be rerun.
PS. you might want to change the build_dir argument name to variant_dir, as the former is deprecated in favor of the latter in recent SCons releases.