Building software from github on command line linux? - linux

Apologies if the following isn't very clear and is very item specific, but I'm just very confused with what to do next and can't find any answers on google.
I am trying to install beschulz's WAV2PNG software on a Ubuntu server.
I've followed the directions on the page to get the required software :
apt-get install make g++ libsndfile1-dev libpng++-dev libpng12-dev libboost-program-options-dev
Which seems to have installed correctly, but next it's saying that I need to build it and I can't work out how to do this.
The docs say :
cd build
make all
Which i've tried but I just get :
-bash: cd: build: No such file or directory
This is the first time i've had to "build" anything after downloading it so any help would be greatly appreciated.

You are supposed to have performed a git clone on the Github repository.
you#vnix$ git clone https://github.com/beschulz/wav2png.git
.... stuff happens ...
you#vnix$ cd wav2png/build
you#vnix$ make all
... lots and lots of stuff happens ...
If this is your first time, things are likely to fail in interesting and/or intriguing ways. You probably want to make sure you are in an environment where you can scroll back and look at error messages and copy/paste them into Google or a new question (tmux, screen, and Emacs ansi-term are all popular alternatives, although a terminal with a big enough scrollback buffer and reasonable keyboard bindings to navigate it would be a good start already).

Related

Idris/cabal install issues from removePathRecursive on Windows

Installing Idris on Windows 10 using instructions to:
Install Haskell following this
Replaced , with ; in multiline paths of config files as reported by #gergelybat in this
c:\Users\me\cabal update
c:\Users\me\cabal install idris
Several dependency errors arise, I follow Idris' instructions to apply with blind faith the following further flags
----reinstall
--avoid-reinstalls
--force-reinstalls
--upgrade-dependencies
Progress is made things begin to be built, we get all the way to building a temp directory with something called idris-1.3.1\…\setup.exe
Then we crash with following error:
C:\Users\me\AppData\Local\Temp\cabal-tmp-26128\idris-1.3.1\dist\setup: removeDirectoryRecursive:
…": unsatisfied constraints (The directory is not empty.)
Googling this I find this same error happens across cabal installs and logged as issues on oodles of GitHub projects. Theories are all over the map and no solutions provided. The Haskell documentation on removeDirectoryRecursive offers a clue ending with the remark that this fails on Windows if the directory is a symbolic-link.
How does one get past this problem to finish an install?
This is mostly to record the steps that worked, thanks to Michael Sonyman for the major tip.
Steps to follow.
Install Haskell (with Stack) following this
Replace , with ; in multiline paths of config files as reported by #gergelybat in this
Check that you have a version of make by checking stack exec -- which make
if you get no make then install GnuWin32,
ensure that the install directory for (e.g. c:\Program Files (x86)\GnuWin32\bin is added to your system path (follow "set environment variables").
Restart PowerShell/Command prompt, retry step 3, you should see a make found, if not recheck your steps.
Run stack install --resolver lts-12.26 idris … this may be very slow. It ends by copying the Idris compiler and other items to C:\Users\you\AppData\Roaming\local\bin:
Test by typing idris at prompt, it should load the Idris REPL.
Enjoy dependent typing for the rest of your programming life.
You could try using cabal new-build or cabal new-install, but I am not sure if that will work.

What is meant with "Run make inside the vim directory"

This is a simple and perhaps forehead-slapping obvious question, but I still venture to ask it. It is part of a larger effort to troubleshoot a problem I have with vim-fsharp (see github repo here), where I continually get error messages like "Error detected while processing function fsharpbinding#python#OnBufWritePre" and a number of broken pipe errors. I have tried to uninstall and re-install the plugin a few times and with different methods, but none have worked so far, so I'm trying to reconstruct my install process in minutae.
I have also tried to ensure that I have the proper privileges and have run all possible commands with sudo.
My question is now regarding the third point in the installation instruction "Run make inside the vim directory." I'm not sure I understand what the vim directory in this context is. Is it ~/.vim or ~/.vim/bundle/vim-fsharp? And does this mean that I do the following (after having ensured that I have both pathogen and syntastic and run git clone https://github.com/fsharp/vim-fsharp.git): cd vim-fsharp && sudo make?
Run make inside the vim directory.
make needs a Makefile. Since you are unlikely to have one in ~/.vim/ and there's one in ~/.vim/bundle/vim-fsharp you must logically do $ make in the latter:
$ cd ~/.vim/bundle/vim-fsharp
$ make
If I read the Makefile right you don't need sudo.

Display message during make install using automake

Using gnu automake how do I display a custom message to the user during the make install stage?
I have been reading the automake manual and various other tutorials but have not yet found an answer, it may just be hidden somewhere in the manual and I failed to find it. Please point it out if you where it's explained.
I am converting some source to use automake and near the end stage of make install I would like to display a message to tell the user they should run a particular script to set up some extra things that shouldn't be part of a automake, or can not (easily) be done in an install-data-hook or something.
Additionally is there actually a clean way to run a custom script using automake (outside of install hooks and such)? I can imagine it's big nono so I am not seriously considering it, but I am curious.
Simply include an install hook in your Makefile.am file:
install-exec-hook:
echo "Do this other thing now"
Additionally is there actually a clean way to run a custom script
using automake (outside of install hooks and such)?
Install hooks are exactly what that is for.
http://www.gnu.org/software/automake/manual/html_node/Extending-Installation.html

Setting up Cygwin + Android NDK + cocos2Dx to work with Eclipse

I'm following a tutorial from this website: Monetizing Game Apps by Todd Perkins
Access to all the files are not required for the questions I'm asking. I have done research on how to solve this on stack overflow and discussed it below
I have followed the tutorial and it has asked me to:
Install Cygwin
Download Cocos2dx-2.0.1(I know this is old, but I don't want to deal with deprecating problems until I'm more confident with the environment)
Run create-android-project.bat(works fine).
Open project I created- and move to proj.android and run build_native.sh in Cygwin.
Then I open up cygwin.bat, navigate to myproject/proj.android and run ./build_native.sh
Problem:
$ ./build_native.sh
Using prebuilt externals
./build_native.sh: line 74: /cygdrive/c/android-ndk-r9c-windows-x86_64/ndk-build: No such file or directory
So I looked into the files and double-checked my changes:
In create-android-project.bat I modified the following variables:
set _CYGBIN=c:\Cygwin64\bin
set _ANDROIDTOOLS=c:\Program Files (x86)\ADT\adt-bundle-windows-x86_64-20130219\sdk\tools
set _NDKROOT=c:\android-ndk-r9c-windows-x86_64
Check line 74 that cygwin complained about in myproject/proj.android/build_native.sh:
echo "Using prebuilt externals"
$NDK_ROOT/ndk-build -C $GAME_ANDROID_ROOT \
NDK_MODULE_PATH=${COCOS2DX_ROOT}:${COCOS2DX_ROOT}/cocos2dx/platform/third_party/android/prebuilt
Double check what NDK_ROOT is pointing to in build_native.sh:
NDK_ROOT=/cygdrive/c/android-ndk-r9c-windows-x86_64
COCOS2DX_ROOT=/cygdrive/c/Users/DarkRaveDev/Documents/cocos2d-x-2.0.1
GAME_ROOT=$COCOS2DX_ROOT/chaara
GAME_ANDROID_ROOT=$GAME_ROOT/proj.android
RESOURCE_ROOT=$GAME_ROOT/Resources
My Research:
I surfed SO for quite some time and tried the following from SO:
EOL Conversion in Notepad++ so LF works for windows for the build_native.sh
An answer somewhere said I need to install the make package when installing cygwin.. I'm not getting this problem, so I'm not sure if this applies.
I have searched many ways to set path - NDK_ROOT
QUESTION:
What exactly am I doing wrong? Is it the variables are badly set or is cygwin not properly installed?
Thank you to everyone who commented! :)
This is what I ended up doing.
Reinstall Cygwin : When you get to the select packages to install page, make sure to find DEVEL and change the install action from default to install. I know its a lot of megs but it's easier than combing through it. If you do want to comb through it and get only what you need, I suggest using this website: Installing a c++ compiler for windows
Make your paths simple : Like user2359247 suggested.
Finally run the create_android.bat, open your android project. Keep the path location of your build_native.sh file in mind and open your cygwin terminal.
Navigate to the path in cygwin, and run the file with sh build_native.sh: At this point everything was quite smooth sailing.
NOTE:
Also I kept using my version of ndk which is r9 instead of r8 in the tutorial, it didn't give me any hiccups.
Thank you SO!

How to install something on Linux without Makefile (lessc in this case)

I am relatively new to the Linux world so forgive this question if it is simple. I have cloned the lessc repo from this url: https://github.com/cloudhead/less.js
However I cannot find a way of installing it. Am I missing something or is there a manual way to install things setup like this. I have encountered this problem several times and would appreciate any input you could offer. Thanks!
You don't have to install lessc with make install.
It is not a binary program, it's a javascript, so you jut have to copy in the correct position of your website.
Unlike programs, which have a specified position where they have to be installed, files that have to be served by webserver do not have an install script, because there's not fixed position in the filesystem where a website is stored.

Resources