How to build LLVM doxygen in HTML ? I tried but failed - clang

I want to get a copy of the doxygen web-pages of llvm, so I can work with it without the internet.
I did as follows:
$ cd LLVM_ROOT_DIR
$ mkdir out
$ cd out/
$ ../configure --enable-doxygen
$ make ENABLE_OPTIMIZED=1
But it only built llvm without documentation. I also tried
$ make BUILD_FOR_WEBSITE=1 ENABLE_OPTIMIZED=1
and
$ make ENABLE_OPTIMIZED=1 EXTRA_DIST=1
All of them did not work.
How could I build the web pages ?
Thanks a lot.

Using recent versions of LLVM, an in-source build is prohibited by configure. Luckily the documentation can be built using cmake.
$ mkdir out
$ cd out/
$ cmake -DLLVM_ENABLE_DOXYGEN=On ../
$ make doxygen-llvm
The process will take a while, but after it you should have the full documentation.

Once you enable doxygen in the configure step, you can run make doxygen-llvm on the docs/ folder in your build directory.
You can run make help to check the available options.

I collect the web-site by wget.

Related

Lumber: Command 'lumber' not found

I just setup a Rails Application in my Ubuntu 18 machine, and I want to connect it to Forest Admin. However, Forest Admin requires that I set up a Node Application using npm first. The node application requires the installation of Lumber CLI tool in order to install Forest Admin.
I have however installed Lumber CLI tool by running the command below:
npm install -g lumber-cli#latest -s
When I run the command below npm lumber -version in my command line terminal, I get the response:
6.13.4
But when I try to generate the Forest Admin using the command below:
lumber generate "my_project"...
I get the following error:
Command 'lumber' not found
I need some help. Thank you.
Here's how I solved it:
The issue is because NPM does not have the write access to the directory that will contain the package you want to install (here lumber-cli).
To solve this issue, override the default directory where your global NPM packages will be stored:
mkdir ~/.npm-global
Then, configure NPM to use this directory instead of the default one:
npm config set prefix '~/.npm-global'
Then, make the node executables accessible from your PATH. To do so, export the environment variable PATH by opening or creating the file ~/.profile and add this line at the end:
export PATH=~/.npm-global/bin:$PATH
Finally, reload the ~/.profile file:
source ~/.profile
Try installing lumber cli again using the command below:
npm install -g lumber-cli#latest -s
It should be able to install lumber without any error, and also display the directory where lumber-cli is installed.
Reference: Prevent permission errors at installation
That's all
I hope this helps

How to install Ngrok 2.0 on linux subsystem on Windows 10

I am trying to use Ngrok to create an introspected tunnel to localhost webhook development tool on my Linux subsystem (Powershell --> bash)
I try to install ngrok using the following:
sudo apt install ngrok-client
From what I understand the sudo command used installs ngrok v 1.6.
When I attempt to execute ngrok 80 I get an error:
Invalid address server_addr 'ngrokd.ngrok.com:443'
I searched for this in another post and was informed that ngrok v. 1.6 is obsolete and in order to continue using ngrok would be to upgrade to 2.0
Testing PayPal with Rails
It's advised to download from the website http://ngrok.com, which is simple enough, but what is the correct way to download for linux subsystem use? Should I download for Linux and unzip? Or am I suppose to download for Windows?
Let me know if I'm misunderstanding anything
I use ubuntu since years, I trust the online instructions so either do:
sudo apt-get update
sudo apt-get install ngrok-client
or try to use this instruction and let me know if you have problems
the same instructions are included hear
$ unzip /path/to/ngrok.zip
$ is just the sign from your terminal. You do not need to input $, but you need to open the terminal (ctrl+alt+t), run the unzip command to unzip the folder.
You will find the folder under your downloads. So / is the root of your machine. You need to go inside your home folder which will be /home so you do cd (change directory) followed by that path
cd /home
then you do ls to list all the directories. You should see your profile with your name username. You should be able to get in the download folder with cd <username>/Downloads where <username> should be replaced with your personal folder name
At this point you are inside the Downloads directory. You can do an ls in your terminal, find the name of the file you downloaded (should be something like ngrok-stable-linux-amd64.zip) and run
unzip <file-name.zip>
where file name is the file you downloaded (something like ngrok-stable-linux-amd64.zip) or you can go back to the root directory and run
cd /
unzip /home/<username>/Downloads/<yourfile.zip>
Read the documentation on how to use ngrok. Try it out by running it from the command line:
./ngrok help
Also I read from the documentation, that you can set up that address
There is some discussion online about this
Testing PayPal with Rails
I can help you more but I need your feedback
You can try this from the official docs.
sudo tar xvzf ~/Downloads/ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin

Makefile for building an rpm works locally, but not in Jenkins

I have a makefile for building debian and rpm packages. I have two Jenkins environments, one for Ubuntu and one for CentOS. The debian package works no problem, and the rpm make command works on my machine, but not on Jenkins. Jenkins returns the following error:
cp: cannot stat /root/rpmbuild/SOURCES/myfile.file': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.mII8KL (%install)
I was getting similar errors when developing the package but eventually figured everything out, and all was good. I think the problem may lie with $RPM_BUILD_ROOT, %{buildroot}, or _topdir options. Nothing I have tried has led me anywhere however.
Here is my (modified) Makefile:
# a list of tools we depend on and must install if they're missing
DEBTOOLS=/usr/bin/debuild-pbuilder
RPMTOOLS=/usr/bin/rpmbuild
# convenience target for "make deb"
deb: my-package_1.0_all.deb
# convenience target for "make rpm".
rpm: my-package-1.0-Public.x86_64.rpm
# the target package (on Ubuntu at least)
my-package_1.0_all.deb: $(DEBTOOLS)
cd my-package; debuild-pbuilder -us -uc
my-package-1.0-Public.x86_64.rpm: $(RPMTOOLS)
cd rpmbuild; rpmbuild -bb SPECS/my-package.spec
/usr/bin/debuild-pbuilder:
apt-get -y install pbuilder
/usr/bin/rpmbuild:
yum -y install rpm-build
This is my spec file:
Summary: My Package
Name: my-package
Version: 1.0
Release: Public
Group: Applications/System
License: Public
Requires: external-package
Source1: myfile.file
%description
blah blah
%files
%config /etc/myfile.file
%install
mkdir -p $RPM_BUILD_ROOT/etc/
cp %{SOURCE1} %{buildroot}/etc/myfile.file
%post
ln -sf /etc/myfile.file /etc/external-package.conf
The problem was in fact that the file wasn't being found (obviously). For me this had a lot to do with the confusing nature of building rpm files. When the make command is executed, and the rpmbuild command is called, I needed to be able to specify the directory. When reading the documentation, it was stated you could use rpmbuild -D '_topdir .' -bb path/to/spec.spec to set the _topdir variable to the local directory you call from. This made sense as . represents this in linux.
However the actual call needs to be
rpmbuild -D "_topdir `pwd`" -bb path/to/spec.spec
This doesn't look all that different except it is crucial to use double-quotes. Using this command will run the build within the directory you call it from. After this rpmbuild will copy and handle the files for you as it should (which is confusing in itself).

Missing package github.com/docker/docker/autogen/dockerversion

Trying to compile Docker in Windows according to the instructions here:
How to compile Docker on Windows
and getting this error message:
cannot find package "github.com/docker/docker/autogen/dockerversion" in any of:
Tried browsing to https://github.com/docker/docker/autogen/dockerversion but getting a 404; can anyone tell me how to get this using GIT client?
I had the same issue, the author has updated the post as you have seen to include the use of GitBash. You will need to update your source to get the new 'hack' directory content used in the instructions he outlines as per below:
git clone --depth 1 https://github.com/docker/docker.git /c/gopath/src/github.com/docker/docker
cd /c/gopath/src/github.com/docker/docker
export GOPATH=/c/gopath:/c/gopath/src/github.com/docker/docker/vendor
export DOCKER_CLIENTONLY=1
chmod +x hack/make/.go-autogen && hack/make/.go-autogen
cd docker
go build
Do you have GitBash installed? All of the instructions he provides need to be run in a GitBash window not the Windows Command window now.
I have built it successfully, so if you need any more help I may be of use.

Portable erlang

Is there a recommended way to "bootstrap" an Erlang distribution? I would like to run erlang on the bunch of machines where I do not have root elevation nor development tool-set (no compilers etc ...) . My thinking was to pre-package (on the machine with the same architecture) as much as I can before. What are the minimal requirements for an usable Erlang environment?
You can use the different erlware tools. Using the latest Sinan, you can even create a standalone release with the erts bundled.
Ok, I should have read it before ... (from INSTALL.md)
* Install using the `release` target. Instead of doing `make install` you
can create the installation in whatever directory you like using the
`release` target and run the `Install` script yourself. `RELEASE_ROOT`
is used for specifying the directory where the installation should be
created. This is what by default ends up under `/usr/local/lib/erlang`
if you do the install using `make install`. All installation paths
provided in the `configure` phase are ignored, as well as `DESTDIR`,
and `INSTALL_PREFIX`. If you want links from a specific `bin` directory
to the installation you have to set those up yourself. An example where
Erlang/OTP should be located at `/home/me/OTP`:
$ ./configure
$ make
$ make RELEASE_ROOT=/home/me/OTP release
$ cd /home/me/OTP
$ ./Install -minimal /home/me/OTP
$ mkdir -p /home/me/bin
$ cd /home/me/bin
$ ln -s /home/me/OTP/bin/erl erl
$ ln -s /home/me/OTP/bin/erlc erlc
$ ln -s /home/me/OTP/bin/escript escript
You can look at Wing3D for example.
CouchDB is another example. (Credit to tbikeev.)

Resources