How to change output directory in Sapper + Rollup? - rollupjs

I tried changing rollup.config.js to say
output: {...config.client.output(), dir: __dirname}
It put some stuff in __dirname, some stuff in ./__sapper__, then it threw errors and died. Setting the build --output flag only sets the intermediate file output directory. Do I just have to let it output to the default folder then copy it post build?

Try sapper build my-output-directory.

Related

How to get workspace directory in bazelrc

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

No file or directory exists: Path Varaible Setting

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.

Tensorflow tfcompile: fail at step 2

I follow https://www.tensorflow.org/xla/tfcompile, and fail at step 2.
What's wrong?
cschen
~/git/tensorflow$ bazel build --config=opt //t1:test_graph_tfmatmul
... INFO: Found applicable config definition build:download_clang in
file /home/cschen/git/tensorflow/.bazelrc:
--crosstool_top=#local_config_download_clang//:toolchain --define=using_clang=true --action_env TF_DOWNLOAD_CLANG=1 INFO: Found applicable config definition build:opt in file
/home/cschen/git/tensorflow/.tf_configure.bazelrc:
--copt=-march=native --copt=-Wno-sign-compare --host_copt=-march=native --define with_default_optimizations=true INFO: Build option --cpu has changed, discarding analysis cache.
ERROR: Analysis of target '//t1:test_graph_tfmatmul' failed; build
aborted: no such package 'tools/target_cpu': BUILD file not found on
package path ...
I copy to t1/BUILD from step 2 as follows,
~/git/tensorflow$ cat t1/BUILD
load("//tensorflow/compiler/aot:tfcompile.bzl", "tf_library") ...
The expected result is to generate header file test_graph_tfmatmul.h.
I don't know which version you are using, but on TF1.14, if you git grep tools/target_cpu, you will see one result in the file tensorflow/compiler/aot/tfcompile.bzl.
In the directory tools, there is nothing reminiscent of target_cpu, so I think it must be a bug with the tfcompile.bzl. The problem disappears for me when I comment out the line referencing tools/target_cpu.

Ant error: <buildfile> is not an absolute path

I'm trying to use Ant 1.7 but running into a problem. In my current directory, I have a build file called warupdate.xml. From within this directory, I execute:
/opt/apache-ant-1.7.0/bin/ant -f warupdate.xml
I then get the following error:
Buildfile: warupdate.xml
BUILD FAILED
./warupdate.xml is not an absolute path
Any ideas? Thanks!
Matt
Why name it anything other than build.xml? It's the standard, ant will expect it and then you can simply just run ant from that directory without specifying a build file.
Here's my warupdate.xml:
<project>
<echo>Tada!</echo>
</project>
Here's my Ant command:
$ /opt/ant/bin/ant -f warupdate.xml
Buildfile: /Users/david/warupdate.xml
[echo] Tada!
BUILD SUCCESSFUL
Total time: 0 seconds
Basically, it works.
Something else is going on, and you're not giving the full story. What does warupdate.xml look like? What if you use ant -d to get a verbose debugging output. Maybe that will show you what's going on. Why are you giving the full path to ant?
You have to give us more information.

Unable to run the demo setup

I have downloaded the Activity 5.10 zip file and then i have downloaded and configured the Apache ANT and i test it and it worked successfully.
But i am unable to run the demo file as specified in this link http://activiti.org/userguide/#demo.setup
if i type the following using the cmd command line:-
C:\activiti-5.10\activiti-5.10\setup>ant demo.start
I will get the following error:-
'ant' is not recognized as an internal or external command, operable program or batch file.
Can anyone help me in identifying what is the problem?
BR
:::UPDATE:::
thanks for the reply, i have copied the ANT bin files inside the setup directory for the activity,, then i run the CMD command again ,, but i got the following error that i build failed,,
AS MENTIONED BELOW:-
C:\Users\Desktop\activiti-5.10\activiti-5.10\setup>ant demo.start
Buildfile: C:\Users\Desktop\activiti-5.10\activiti-5.10\setup\build.xml
demo.install:
internal.cfg.create:
[copy] Copying 1 file to C:\Users\Desktop\activiti-5.10\activiti-5.
10\setup\build\activiti-cfg
[zip] Building zip: C:\Users\Desktop\activiti-5.10\activiti-5.10\s
etup\build\activiti-cfg.jar
[echo] copying configuration to ../workspace/activiti-engine-examples/src/m
ain/config
[unzip] Expanding: C:\Users\Desktop\activiti-5.10\activiti-5.10\setu
p\build\activiti-cfg.jar into C:\Users\Desktop\activiti-5.10\activiti-5.
10\workspace\activiti-engine-examples\src\main\config
internal.classpath.libs:
internal.taskdef.launch:
h2.start:
[echo] starting H2 database...
[launch] launching cmd 'C:\Users\Desktop\activiti-5.10\activiti-5.10\
apps\h2\h2.start.bat ' in dir 'C:\Users\Desktop\activiti-5.10\activiti-5
.10\apps\h2'
[launch] waiting for launch completion msg 'TCP server running'...
[launch] 'java' is not recognized as an internal or external command,
[launch] operable program or batch file.
[launch] launched process completed
[echo] H2 database started
tomcat.start:
BUILD FAILED
C:\Users\Desktop\activiti-5.10\activiti-5.10\setup\build.xml:330: couldn
't find executable for script C:\Users\Desktop\activiti-5.10\activiti-5.
10\apps\apache-tomcat-6.0.32\bin\startup
Total time: 0 seconds
Looks like you didn't set the ant directory in you path variable. Either specifiy the entire path to ant or add it to the path variable
I typed tomcat.install and it solved the problem since I need to download the tomcat inside the apps directory.

Resources