Installing older versions of Emacs (19.34) - emacs

I am having some trouble installing an older version of emacs (19.34) to run an old script. Currently, I have downloaded the source code and tried to compile but I am getting some error which I don't seem to understand (there are some previous errors with line endings too, but they can be fixed).
I am first running the ./configure script, then running
gmake && gmake install
I am getting this error
Producing `src/paths.h' from `src/paths.in'.
src/paths.h is unchanged
Producing `src/paths.h' from `src/paths.in'.
src/paths.h is unchanged
cd lib-src; gmake all \
CC='gcc' CFLAGS='-g -O' CPPFLAGS='' \
LDFLAGS='' MAKE='gmake'
gmake[1]: Entering directory `/user/b/user1/emacs-19.34/lib-src'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/user/b/user1/emacs-19.34/lib-src'
cd src; gmake all \
CC='gcc' CFLAGS='-g -O' CPPFLAGS='' \
LDFLAGS='' MAKE='gmake'
gmake[1]: Entering directory `/user/b/user1/emacs-19.34/src'
cd ../lwlib/; gmake -w
gmake[2]: Entering directory `/user/b/user1/emacs-19.34/lwlib'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/user/b/user1/emacs-19.34/lwlib'
CC='gcc' CFLAGS='-g -O' MAKE='gmake'
"C_SWITCH_X_SITE=-I/usr/openwin/include"
/bin/sh: C_SWITCH_X_SITE=-I/usr/openwin/include: not found
gmake[1]: *** [really-lwlib] Error 1
gmake[1]: Leaving directory `/user/b/user1/emacs-19.34/src'
gmake: *** [src] Error 2
I have checked that /usr/openwin/include is present in the server, and have manually added /usr/openwin/include to PATH and LD_LIBRARY_PATH. Somehow, the Makefile is not picking it up.
The server config is SunOS 5.10, Generic January 2005. I do not have sudo access, but I have manually set the install path to my local home directory.
Any suggestions?
Thanks in advance!
Edit: Any suggestions that I could install Emacs 19.34 on the server without installing from source would be helpful too.

Where are the double quotes around this line coming from?
"C_SWITCH_X_SITE=-I/usr/openwin/include"
It looks like /bin/sh is complaining about this entire line "not found", rather than setting an environment variable as that line seems to be intended to do.
If this line is not something you set yourself, then trying a different shell (SHELL=/usr/local/bin/bash gmake for example) might work.

Related

X11 problems when compiling openjdk 9 on centos 7

I find problems when I started to compile openjdk for my first time.
Below is what I did
hg clone http://hg.openjdk.java.net/jdk9/dev 9dev
cd 9dev
bash ./get_source.sh
bash ./configure
Then, I got this error message
configure: error: Could not find X11 libraries. You might be able to fix this by running 'sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel'.
Then, I did what it told me to do.
After the installation, the same error still exists.
So I checked where the files lies on my machine
rpm -qa | grep X11
libX11-1.6.3-3.el7.x86_64
libX11-common-1.6.3-3.el7.noarch
libX11-devel-1.6.3-3.el7.x86_64
rpm -ql libX11-1.6.3-3.el7.x86_64
/usr/lib64/libX11-xcb.so.1
/usr/lib64/libX11-xcb.so.1.0.0
/usr/lib64/libX11.so.6
/usr/lib64/libX11.so.6.3.0
so i tried the way of specifying the X11 path
bash ./configure --x-libraries=/usr/lib64
Unfortunately, the same error still stays.
Can someone help me out of here, please?
thx
update
Thank #omajid for directing me to the log file config.log, where I found that the configure is using the gcc in my linuxbrew installation.
configure:56234: /data/alex/git/brew/bin/g++ -o conftest conftest.cpp -lX11 >&5
/data/alex/git/brew/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
configure:56234: $? = 1
So after I exported my c compiler to the system one, the problem was fixed.
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
Here is the relevant packages needed at build time and the configure flags I use in my spec file for building unofficial OpenJDK 9 packages for Fedora/EPEL:
autoconf
automake
alsa-lib-devel
binutils
cups-devel
desktop-file-utils
fontconfig
freetype-devel
elfutils
giflib-devel
gcc-c++
gdb
gtk2-devel
lcms2-devel
libjpeg-devel
libpng-devel
libxslt
libX11-devel
libXi-devel
libXinerama-devel
libXt-devel
libXtst-devel
nss-devel
pkgconfig
xorg-x11-proto-devel
zip
java-1.8.0-openjdk-devel
bash ../configure \
--with-boot-jdk=/usr/lib/jvm/java-1.8.0-openjdk/ \
--with-native-debug-symbols=internal \
--enable-unlimited-crypto \
--with-zlib=system \
--with-libjpeg=system \
--with-giflib=system \
--with-libpng=system \
--with-lcms=system \
--with-stdc++lib=dynamic \
--disable-javac-server \
--disable-warnings-as-errors
In any case, the error messages produce by configure are a best guess. You should take a look at config.log to see what test actually failed and what the error messages are. In this case, it looks like you are probably missing one of several X11 libraries. Possibly libXinerama-devel.
If this still doesn't fix your error, please paste the error messages from your autoconf log file (should be named config.log or configure.log, I forget).

Installing Perl modules on Ubuntu 16.04

I'm trying to install Perl modules Geo::ShapeFile and Math::Round but I keep coming across the same error and I can't find a solution that works. I've local::lib installed fine but its not being found or something? Am I doing it in the wrong place?
cian#cian-Aspire-5750:~/Documents/Math-Round-0.07$ make install
Manifying 1 pod document
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/man/man3'
mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.22/ExtUtils/Install.pm line 477.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1.
Makefile:697: recipe for target 'pure_site_install' failed
make: *** [pure_site_install] Error 13
I notice in my directory '/usr/local/man' points to 'usr/share/man'. I dunno if this was an issue how to solve it. Thanks.
I've local::lib installed fine
No, you don't. The environment has clearly not by set by local::lib. Make sure the following in your login script:
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"
(Adjust the path to local::lib if needed.)
Log out and log back in or use the following to pick up the changes:
exec bash -l
If you want to install module systemwide (it's what you do), you should have root privileges. Try sudo make install or install modules locally.
Alternatively you may try a cpanm client, which handles local::lib installs either:
$ cpanm -l ~/ Geo::ShapeFile Math::Round
And then don't forget to adjust perl5lib var to see installed modules:
$ PERL5LIB=~/lib/perl5

Ocamlfind command not found

I'm running into an issue installing a package that's reliant on ocamlfind but I'm getting an ocamlfind: command not found error when making.
I have installed ocamlfind with the ocaml package manager and have tried reinstalling using "opam reinstall ocamlfind".
I have also tried the 'eval opam config env' command to see if updates my bin.
Has anyone run into a similar issue/know what this might be caused by
The output when running the make:
make
ocamlfind ocamlc -pp "camlp4o -I lib/dcg -I lib/ipp pa_dcg.cmo pa_ipp.cmo" -w usy -thread -I lib -I lib/dcg -I lib/ipp -c semantics.ml
/bin/sh: ocamlfind: command not found
The output when trying ocamlfind
ocamlfind
-bash: ocamlfind: command not found
ocaml is installed
opam install ocamlfind
[NOTE] Package ocamlfind is already installed (current version is 1.5.5).
and when running the eval command
eval 'opam config env'
CAML_LD_LIBRARY_PATH="/home/centos/.opam/system/lib/stublibs:/usr/lib64/ocaml/stub libs"; export CAML_LD_LIBRARY_PATH;
MANPATH="/home/centos/.opam/system/man:"; export MANPATH;
PERL5LIB="/home/centos/.opam/system/lib/perl5"; export PERL5LIB;
OCAML_TOPLEVEL_PATH="/home/centos/.opam/system/lib/toplevel"; export OCAML_TOPLEVEL_PATH;
PATH="/home/centos/.opam/system/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/centos/.local/bin:/home/centos/bin"; export PATH;
I'm on a server running centos 7
This command
eval 'opam config env'
is almost assuredly a typo and was supposed to be
eval `opam config env`
though using $(...) instead is the modern equivalent and avoids this font-fact confusion
eval $(opam config env)
That being said that just sets the environment variables in the current shell session (and exports them for use by processes run by this shell session).
As such that needs to be run in every shell session that needs those set (including each line of the makefile that expects them to be set if the environment that runs make doesn't already have them set and exported).
try
sudo apt-get install ocaml-findlib

rpmbuild no such file or directory

I'm just learning making rpm packages for some custom builds of software that gets compiled from source (some legacy stuff needs this, so I'm trying to learn, as some packages can't use the latest versions), but hitting an error (I'm doing this in Vagrant, and also as root, but typically I'm trying not to use root as I'm aware it has potential for damage, its just this example seems to need some root changes).
sudo rpmbuild -ba testspec.spec --define "_topdir /tmp/"
So far it looks to be using the directory I expected, /tmp/rpmbuild
make[2]: Entering directory `/tmp/rpmbuild/BUILD/exim-4.80.1/build-Linux-x86_64/pdkim'
make[2]: `pdkim.a' is up to date.
make[2]: Leaving directory `/tmp/rpmbu
But then I see these errors...
/usr/lib/rpm/brp-compress: line 8: cd: /tmp/BUILDROOT/custom-exim-4.80.1-1.x86_64: No such file or directory
+ /usr/lib/rpm/brp-strip
find: `/tmp/BUILDROOT/custom-exim-4.80.1-1.x86_64': No such file or directory
+ /usr/lib/rpm/brp-strip-static-archive
find: `/tmp/BUILDROOT/custom-exim-4.80.1-1.x86_64': No such file or directory
+ /usr/lib/rpm/brp-strip-comment-note
So it now seems to be looking in /tmp/BUILDROOT
I'm new to rpmbuild, and don't quite understand some of the process.
My test spec file is at...
%define myversion exim-4.80.1
##%define mybase %{getenv:HOME}
%define mybase /tmp
%define _topdir %{mybase}/rpmbuild
%define _tmppath %{mybase}/rpmbuild/tmp
%define name custom-exim
%define release 1
%define version 4.80.1
%define buildroot %{_topdir}/%{name}-%{version}-root
BuildRoot: %{buildroot}
Summary: %{name}
Name: %{name}
Version: %{version}
Release: %{release}
Source0: ftp://exim.noris.de/exim/exim4/old/exim-4.80.1.tar.gz
License: GPLv1+
Group: Language
AutoReq: no
AutoProv: no
Requires: db4-devel pcre-devel libdb-devel libXt-devel libXaw-devel
%description
Custom Exim Build
%prep
#Do the following manually before building rpm
#mkdir -p /tmp/rpmbuild/BUILD /tmp/rpmbuild/SPECS /tmp/rpmbuild/SOURCES /tmp/rpmbuild/BUILDROOT /tmp/rpmbuild/RPMS /tmp/rpmbuild/SRPMS
#wget ftp://exim.noris.de/exim/exim4/old/exim-4.80.1.tar.gz -O /tmp/rpmbuild/SOURCES/exim-4.80.1.tar.gz
%setup -q -n %{myversion}
grep exim /etc/passwd || useradd -c "Exim" -d /var/spool/exim -m -s /bin/bash exim
%build
# exim needs to config changes before compiling, may do these first and repackage
cp %{mybase}/rpmbuild/BUILD/%{myversion}/src/EDITME %{mybase}/rpmbuild/BUILD/%{myversion}/Local/Makefile
cp %{mybase}/rpmbuild/BUILD/%{myversion}/exim_monitor/EDITME %{mybase}/rpmbuild/BUILD/%{myversion}/Local/eximon.conf
sed -i -e 's/EXIM_USER=$/EXIM_USER=exim/g' "%{mybase}/rpmbuild/BUILD/%{myversion}/Local/Makefile"
sed -i -e 's/LOOKUP_DNSDB=yes/#LOOKUP_DNSDB=yes/g' "%{mybase}/rpmbuild/BUILD/%{myversion}/Local/Makefile"
make
%install
rm -rf $RPM_BUILD_ROOT
#%{__mkdir_p} '%{buildroot}%{_sbindir}'
make install
%clean
rm -rf $RPM_BUILD_ROOT
%post
%postun
%files
Why is it using /tmp/BUILDROOT literally, instead of /tmp/rpmbuild, and are there other obvious things I'm doing wrong ? I've looked at a lot of other tutorials on rpmbuild, but aren't very clear on best practices or what happens during each phase.
Since the buildroot parm is not passed to rpmbuild, the default path is being used by your spec file:
BuildRoot: %{buildroot}
Try adding the buildroot parm... Add buildroot /tmp/rpmbuild to --define
Or if using a makefile:
BUILD_TMP=/tmp/rpmbuild
TOP_DIR=/tmp
rpmbuild -bb
--buildroot $(BUILD_TMP)
--topdir $(TOP_DIR)
$(SPEC_DIR)/testspec.spec
In my case rpm-build was missing.
So sudo yum install rpm-build solved the problem. Or if you use puppet:
package { 'rpm-build':
ensure => latest,
}

how to avoid cpanm stopping installation waiting for a prompt that is shown only in Build.log

Instaling PGPLOT the install gets stopped for ever here:
$ cpanm PGPLOT
--> Working on PGPLOT
Fetching http://www.cpan.org/authors/id/K/KG/KGB/PGPLOT-2.21.tar.gz ... OK
Configuring PGPLOT-2.21 ... OK
Building and testing PGPLOT-2.21 ...
Looking at the Build.log seems that it is waiting for a prompt answer
$ tail ~/.cpanm/build.log
-L/usr/lib -L/usr/local/lib -lcpgplot -lpgplot -lX11 -lpng -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib -lgfortran -lm \
chmod 755 blib/arch/auto/PGPLOT/PGPLOT.so
cp PGPLOT.bs blib/arch/auto/PGPLOT/PGPLOT.bs
chmod 644 blib/arch/auto/PGPLOT/PGPLOT.bs
Manifying blib/man3/PGPLOT.3
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File `Makefile' has modification time 3e+02 s in the future
PERL_DL_NONLAZY=1 /home/pmg/perl5/perlbrew/perls/perl-5.16.0/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
Default Device for plot tests [recommend /XSERVE] ?
How can I avoid this question either forcing defaults or given the option through env. vars?
[UPDATE] FIX
From the Russell answer I exported the variable for device
export PGPLOT_DEV=/XSERVE; cpanm PGPLOT
And connected with x11vnc to the server (to the main display) for closing all windows the pgplot test was displaying.
[NOTE] don't try to install pgplot perl lib under screen even with ssh -X, chances are that you are not in the same computer you starter your original screen and the X redirection will not work. You can circumvent that limitation with a vnc connection to main display or you will not being able to finish the installation. xrdp and other vnc that open a new session will not work. You need to share the main display.
From reading test.pl in the distribution, it checks the PGPLOT_DEV environment variable. It looks like the valid values are /XSERVE for Unix/Linux and /PNG for Windows.