Problems installing emacs ESS using make - r

I am trying to install emacs ESS using GNU make.
i follow the installation instructions for ESS found in the following
link:
steps 2 and 3 :
http://ess.r-project.org/Manual/ess.html#Installation
for each step i get errors when using make:
below are the instructions and the error messages for each step:
First Instruction:
Optionally, compile elisp files and build the documentation with:
cd /path/to/ESS/
make
Without this step, info, pdf and html documentation and reference card will not be available.
My Action:
C:\Program Files\ESS\ess-17.11>make
System Messages:
cd etc; make all
make[1]: Entering directory `/cygdrive/c/Program Files/ESS/ess-17.11/etc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/c/Program Files/ESS/ess-17.11/etc'
cd lisp; make all
make[1]: Entering directory `/cygdrive/c/Program Files/ESS/ess-17.11/lisp'
emacs -batch -no-site-file -no-init-file -l ./ess-comp.el -f batch-byte-compile ess-custom.el
emacs: not found
make[1]: [ess-custom.elc] Error 127
make[1]: Leaving directory `/cygdrive/c/Program Files/ESS/ess-17.11/lisp'
make: [all] Error 2
Second Instruction:
Optionally, install into your local machine with make install. You might need administrative privileges:
make install
The files are installed into /usr/share/emacs directory. For this step to run correctly on macOS, you will need to adjust the PREFIX path in Makeconf. The necessary code and instructions are commented in that file.
My Action:
C:\Program Files\ESS\ess-17.11>make install
System Messages:
cd etc; make install
make[1]: Entering directory `/cygdrive/c/Program Files/ESS/ess-17.11/etc'
mkdir -p /usr/share/emacs/etc/ess/icons
mkdir -p /usr/share/emacs/etc/ess/ESSR/R
cp -p .IS.RELEASE git-ref *.S sas-keys.* ess-sas-sh-command *.jl /usr/share/emacs/etc/ess
cp -p icons/*.xpm /usr/share/emacs/etc/ess/icons
cp -p ESSR/LOADREMOTE ESSR/VERSION /usr/share/emacs/etc/ess/ESSR
cp -p ESSR/R/*.R ESSR/R/.*.R /usr/share/emacs/etc/ess/ESSR/R
chmod +x /usr/share/emacs/etc/ess/ess-sas-sh-command
chmod: not found
make[1]: *** [install] Error 127
make[1]: Leaving directory `/cygdrive/c/Program Files/ESS/ess-17.11/etc'
make: *** [install] Error 2
I'll appreciate you help with installing ESS using make.
Thanks
Rafael

You are trying to execute under Windows commands, which are for Linux environments.
Specifically, your installation fails at the following lines:
emacs -batch -no-site-file -no-init-file -l ./ess-comp.el -f batch-byte-compile ess-custom.el
emacs: not found
and
chmod +x /usr/share/emacs/etc/ess/ess-sas-sh-command
chmod: not found
There is no chmod command under Windows. Here is the cmd equivalent: https://www.cyberciti.biz/tips/windows-change-access-permissions-from-the-command-line.html
The ESS Manual you provided suggests the following approach:
Note for Windows and macOS users: The most straightforward way to
install Emacs on your machine is by downloading the Emacs binary by
Vincent Goulet; either Emacs Modified for macOS or from Emacs Modified
for Windows.
I also suggest that you install the Emacs Modified for Windows, as installation via make under windows will be too difficult/costly - virtually impossible.

Related

Symlink make as gmake on Mac

I am running a program (OpenModelica OMEdit 1.18.0~dev-109-ged8ef0a) which requires gmake for one of its operations. gmake is not installed on my Mac (Big Sur 11.5.2) but make is. I tried to symlink gmake to point at make but it does not work:
➜ where make
/usr/bin/make
➜ make -v | HEAD -n 1
GNU Make 3.81
➜ pwd
/opt/openmodelica/bin
➜ sudo ln -s /usr/bin/make /opt/openmodelica/bin/gmake
➜ ls -lh gmake
lrwxr-xr-x 1 root wheel 13B 13 Dec 09:15 gmake -> /usr/bin/make
➜ /opt/openmodelica/bin/gmake -v
gmake: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find gmake 2> /dev/null' failed with exit code 17664: (null) (errno=Invalid argument)
xcode-select: Failed to locate 'gmake', requesting installation of command line developer tools.
It prompts each time to install the XCode command line developer tools which I have already done. From the error message it looks like it is trying to find gmake despite pointing at the make executable? (Why is it erroring?) Is there a way to get this to work as I was expecting or do I have to install gmake using brew then symlink to that?
Command line tools version:
➜ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 12.5.1.0.1.1623191612
volume: /
location: /
install-time: 1639360537
groups: com.apple.FindSystemFiles.pkg-group
** edit **
I'm using zsh 5.8 (x86_64-apple-darwin20.0), I don't know if that's a factor in the gmake symlink to make not working correctly?
I don't understand why this works but from #Holger Just's comment:
➜ brew install make
This will add a symlink:
➜ ls -lh /usr/local/bin/gmake
/usr/local/bin/gmake# -> ../Cellar/make/4.3/bin/gmake
And then symlinking to that instead:
➜ sudo ln -s /usr/local/bin/gmake /opt/openmodelica/bin/gmake
... works as expected:
➜ /opt/openmodelica/bin/gmake -v | head -n 1
GNU Make 4.3

How to change %install section in spec file?

I tried to build binaries in RHEL6 using rpmbuild command.It throws file not found error during rpmbuild command execution. But In RHEL5 the same rpmbuild command is working fine.
RHEL5 execution result:
*Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.77266
umask 022
cd /usr/src/redhat/BUILD
LANG=C
export LANG
unset DISPLAY*
RHEL6 execution result:
*Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.BeMhyH
umask 022
cd //rpmbuild/BUILD
'[' //rpmbuild/BUILDROOT/ '!=' / ']'
rm -rf //rpmbuild/BUILDROOT/
++ dirname //rpmbuild/BUILDROOT/
mkdir -p //rpmbuild/BUILDROOT
mkdir //rpmbuild/BUILDROOT/
LANG=C
export LANG
unset DISPLAY
/usr/lib/rpm/check-buildroot*
I am not able to find any %install changes between the spec files. Any one please help me to understand what am i doing wrong?
Thanks in Advance..!
The only problem that is clear from the snippets provided is that $HOME is not defined in your rpmbuild environment. $HOME/rpmbuild is the default build root for 'rpmbuild' in RHEL6, instead of /usr/src/redhat as in RHEL5.
Things to consider:
Is there an '~/.rpmmacros' file that is altering the rpmbuild
directives.
The temporary %install script will not be deleted on
error-exit. Inspecting it directly might tell you more about why it failed.
Ex:
[user#host rpmbuild]$ rpmbuild -bb nano
<snip>
+ exit 1
error: Bad exit status from /var/tmp/rpm-tmp.2uw1tZ (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.2uw1tZ (%install)
[user#host rpmbuild]$ cat /var/tmp/rpm-tmp.2uw1tZ
#!/bin/sh
RPM_SOURCE_DIR="/home/user/rpmbuild/SOURCES"
RPM_BUILD_DIR="/home/user/rpmbuild/BUILD"
...
Older recommendations were to nuke the target buildroot as the first step of %install. To help force a separation between the %build and %install steps, newer versions of rpmbuild strictly enforce it by doing it for you for the first step, as shown in what you pasted in.
I am assuming that your %build stage is putting one or more files into the target buildroot area, which it shouldn't be doing. It should all be in the build area only.

Unable to automate script: sudo: no tty present and no askpass program specified

I would like to automate a build - for now, during my development, so no security stuff involved.
I have created a script that moves libs to /usr/local/lib and issues ldd command.
These things require sudo.
Running the script from the builder (Qt Creator), I am not prompted to enter my sudo password, and I get the error
sudo: no tty present and no askpass program specified
Sorry, try again.
I have found a few solutions to this but it just did not work... what am I missing ?
Exact code:
in myLib.pro
#temporary to make my life easier
QMAKE_POST_LINK = /home/me/move_libs_script
in move_libs_script:
#!/bin/bash
sudo cp $HOME/myLib/myLib.so.1 /usr/local/lib/
sudo ldconfig
I did as suggested by the answer above: edited visudo and added the script... even added qmake...
sudo visudo
added at the end:
me ALL=NOPASSWD: /home/me/move_libs_script, /usr/bin/qmake-qt4
It saved file: /etc/sudoers.tmp (and doing the command sudo visudo again I saw that my changes were kept so I am not sure what is with the tmp)
Still same errors
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
Edit: after asking the question I found a suggested similar question:
https://stackoverflow.com/a/10668693/1217150
So I tried to add a custom step...
Result:
09:50:03: Running build steps for project myLib...
09:50:03: Could not start process "ssh-askpass Sudo Password | sudo -S bash ./move_libs_script"
Error while building project myLib (target: Desktop)
When executing build step 'Custom Process Step'
(if I run from terminal I get asked for password)
New edit: so I thought I can outsmart the system and call a script that calls my script...
myLib.pro
QMAKE_POST_LINK = /home/me/sudo_move_libs_script
sudo_move_libs_script:
#!/bin/bash
ssh-askpass Sudo Password | sudo -S bash $HOME/move_libs_script
got it !!! I will post as answer i guess
New edit as answer to comment:
in mainExe.pro:
QMAKE_POST_LINK = ./link_lib
in link_lib:
#!/bin/sh
LD_LIBRARY_PATH=$HOME/myLib
export LD_LIBRARY_PATH
Result: Executable fails because the lib is not to be found (of course before testing I emoved the copy from /usr/local/lib)
Solution 1:
To run the command I needed with sudo from Qt, and be asked for password
myLib.pro
QMAKE_POST_LINK = /home/me/sudo_move_libs_script
sudo_move_libs_script:
#!/bin/bash
ssh-askpass Sudo Password | sudo -S bash $HOME/move_libs_script
move_libs_script:
#!/bin/bash
cp $HOME/myLib/myLib.so.1 /usr/local/lib/
ldconfig
Solution 2
Avoid using sudo: run a custom executable from Qt Creator (just like I would when project is deployed) - I can execute my program with correct dependency. Unfortunately it does not work for debug.
In the Run Configuration, place a script "dummy_executable" instead the app executable:
dummy_executable:
#!/bin/sh
LD_LIBRARY_PATH=$HOME/myLib
export LD_LIBRARY_PATH
$HOME/myExec/myExec "$#
This method is great for running the program ... unfortunately gdb fails... I think it tries to debug the shell script ? So it won't work if I try to step through my program.
Choosing Solution 1, because it has advantages: allows me to build and debug the program, which is what I really need, and with the dependencies set I get the library built before running the program - which is perfect.
Thank you Etan Reisner

Error installing Meteor on linux x86_64 chrome os

I am trying to install Meteor on the HP14 Chromebook. It is a linx x86_64 chrome os system.
Each time I try to install it I run into errors.
The first time I tried to install it the installer just downloaded the Meteor preengine but never downloaded the tarball or installed the actual meteor application structure.
So, I decided to try as sudo.
sudo curl https://install.meteor.com | /bin/sh
This definitely installed it because you can see it when ls
chronos#localhost ~/projects $ chronos#localhost ~/projects $ ls /home/chronos/user/.meteor/
bash: chronos#localhost: command not found
Now when I try to run meteor --version or meteor create myapp without sudo I get the following error.
````
chronos#localhost ~/projects $ meteor create myapp
'/home/chronos/user/.meteor' exists, but '/home/chronos/user/.meteor/meteor' is not executable.
Remove it and try again.
````
When I try to run sudo meteor --version or sudo meteor create myapp I get this error.
chronos#localhost ~/projects $ sudo meteor create myapp
mkdir: cannot create directory ‘/root/.meteor-install-tmp’: Read-only file system
Any ideas? Thinking I have to make that partition writeable. I made partition 4 writeable.
Put your chrome book into dev mode.
http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices
Boot into dev mode.
ctrl-alt t to crosh
shell
sudo su -
cd /usr/share/vboot/bin/
./make_dev_ssd.sh --remove_rootfs_verification --partitions 4
reboot
After rebooting
sudo su -
mount -o remount,rw /
mount -o remount,exec /mnt/stateful_partition
Write yourself a read/write script
sudo vim /sbin/rw
#!/bin/bash
echo "Making FS Read/Write"
sudo mount -o remount,rw /
sudo mount -o remount,exec /mnt/stateful_partition
sudo mount -i -o remount,exec /home/chronos/user
echo "You should now have full Read/Write access"
exit
Change permissions on script
sudo chmod a+x /sbin/rw
Run to set read/write root
sudo rw
Install Meteor as indicated on www.meteor.com via curl and meteor create works!
Alternatively you can edit the chomeos_startup though that might not be the best idea. It is probably best to have read/write on demand as illustrated above.
cd /sbin sudo
sudo vim chromeos_startup
Go to lines 51 and 58 and remove the noexec options from the mount command.
Down at the bottom of the script, above the note about ureadahead and below the if statement, add in:
mount -o remount,exec /mnt/stateful_partition
#uncomment this to mount root r/w on boot
mount -o remount,rw /
Again, editing chromeos_startup probably isn't the best idea unless you are so lazy you can't type sudo rw.
Enjoy.
This is super easy to fix!!
Just run this (or put it in .bashrc or .zshrc to make it permanent):
sudo mount -i -o remount,exec /home/chronos/user
Based on your question (you are using sudo) I assume you already have Dev Mode enabled, which is required for the above sudo command to work.
ChromeOS mounts the home folder using the noexec option by default, and this command remounts it with exec instead. And boom, Meteor will work just fine after that (and so will a bunch of other programs running out of your home folder).
Original tip: https://github.com/dnschneid/crouton/issues/928

Problem compiling nginx on Solaris 10

My setup as below
# export PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin
# ./configure --prefix=/usr/local/nginx --user=webservd --group=webservd --with-http_stub_status_module --with-openssl=/usr/local/ssl/bin/openssl --with-debug --with-pcre=/usr/local/bin
and i get error code as such when i execute make
# make
make -f objs/Makefile
make[1]: Entering directory `/export/home/myhome/nginx-0.7.63'
cd /usr/local/bin \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared
/bin/sh: ./configure: not found
make[1]: *** [/usr/local/bin/Makefile] Error 1
make[1]: Leaving directory `/export/home/myhome/nginx-0.7.63'
make: *** [build] Error 2
any idea how to fix it?
That initial cd to /usr/local/bin looks very strange; are you building it in the global /usr tree?
It looks as if it's cd:ing to the wrong directory, for some reason. Look in the referenced Makefile (objs/Makefile) and try to figure out why.
UPDATE: It seems the problem is that it's trying to build the PCRE library. If you have it pre-built, that seems like an odd decision. This blog post suggests using the --with-cc-opt="-I /usr/include/pcre" option to point out to the configure script where you have headers for PCRE, might be worth trying.

Resources