make check fails to start in Postgres 8.4.2 - postgresql

I am running into a strange error when trying to run PostgreSQL 8.4.2's regression suite on a new Ubuntu instance that I've created on Amazon EC2.
I can configure PostgreSQL successfully:
$ ./configure
[ Output not shown ]
$ tail -1 config.log
configure: exit 0
It builds just fine:
$ make
[ Ouput clipped ]
All of PostgreSQL successfully made. Ready to install.
But when I try to run the regression suite, I receive an error:
$ make check
[ Ouput clipped ]
make[2]: Entering directory `/home/ubuntu/stock/postgresql-8.4.2/src/test/regress'
You must use GNU make to use Postgres. It may be installed
on your system with the name 'gmake'.
However, I believe that I am running GNU Make:
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
$ ls -l `which gmake`
lrwxrwxrwx 1 root root 13 Feb 6 17:41 /usr/bin/gmake -> /usr/bin/make
I see that in the src/test/regress directory, there is a Makefile:
$ cat src/test/regress/Makefile
# The Postgres make files exploit features of GNU make that other makes
# do not have. Because it is a common mistake for users to try to build
# Postgres with a different make, we have this make file that does nothing
# but tell the user to use GNU make.
# If the user were using GNU make now, this file would not get used because
# GNU make uses a make file named "GNUmakefile" in preference to "Makefile"
# if it exists. Postgres is shipped with a "GNUmakefile".
all install clean check installcheck:
#echo "You must use GNU make to use Postgres. It may be installed"
#echo "on your system with the name 'gmake'."
The comments in that Makefile indicate that there should be a file named GNUmakefile in that directory, but there is not:
$ ls src/test/regress/*akefile
src/test/regress/Makefile
There is a GNUMakefile in the top-level directory:
$ ls *akefile
GNUmakefile Makefile
Even when I force make and make check to use the GNUmakefile, via -f GNUmakefile, the same error occurs.
Note that I can run the regression suite just fine on my home machine.
Does any one have any ideas why it's not working on the EC2 instance?
EDIT: On my home machine, I'm running Ubuntu 12.04. The EC2 instance is running 13.10. Both machines are running make version 3.81.

You must have a messed up download or checkout. There should be a src/test/regress/GNUmakefile there, as you suspected. Try downloading again.

This is what that directory looks like on mine:
$ ls src/test/regress/*akefile
src/test/regress/GNUmakefile src/test/regress/Makefile

Related

How can you solve a "File not found error: No such file or directory" when deploying on gcloud?

Hi I am new to programming and I hope someone can help with this.
A team mate of mine did some changes yesterday through github and now we get this error when we want to "gcloud app deploy on our gcloud": "ERROR: gcloud crashed (FileNotFoundError): [Errno 2] No such file or directory: '/home/name/project/venv/bin/python3.8'."
The app itself still works but it seems we can not deploy anymore as we get this error. Really appreciate you reading this, thanks.
The error (No such file or directory: '/home/name/project/venv/bin/python3.8') suggests that, a virtualenv (venv) was running (perhaps while gcloud was installed) and it is no longer effective (unable to find /home/name/project/venv/bin/python3.8 in the path).
To reactivate the virtualenv, you can:
source /home/name/project/venv/bin/activate
Which should put python3.8 back in your path:
which python3.8
/home/name/project/venv/bin/python3.8
And should return gcloud to a working state for the current shell session.
When that session ends, you'll need to rerun the source ... command.
It's good practice to explicitly deactivate the virtualenv when you're done with it.
Often, when running, the command shell is prefixed with (venv) to indicate that you're in a virtualenv:
# Create a virtualenv in `xxxx`
python3.8 -m venv xxxx
# Activate `xxxx`
me#host:~ $ source xxxx/bin/activate
# Note my prompt is prefixed with `(xxxx)`
(xxxx) me#host:~ $ which python3.8
/home/me/xxx/bin/python3.8
# Within the virtualenv, `python3.8` is ln'd
(xxxx) me#host:~ $ ls -l $(which python3.8)
/home/me/xxx/bin/python3.8 -> /usr/bin/python3.8
# Deactivate `xxxx`
(xxx) me#host:~ $ deactivate
me#host:~ $ which python3.8
/usr/bin/python3.8
(xxxx) me#host:~ $ deactivate
NOTE In the example above, rather than use the customer venv directory, I'm using xxxx to demonstrate the point.

Perl a cpan installation into a specific repository

Hel lo, I'm actually installing a perl module called HmmCleaner here :
https://metacpan.org/pod/HmmCleaner.pl
for that I use :
/beegfs/data/me/perl-5.30.1/localperl/bin/cpan Bio::MUST::Apps::HmmCleaner
But I'm actually into a shared cluster where we have 2 principal directories :
/beegfs/home/me
And
/beegfs/data/me
and in the home repository I have a threshold of number of chunk files to not
I have a threshold that I cannot exceed of the number of chunk files and when I run the /beegfs/data/me/perl-5.30.1/localperl/bin/cpan Bio::MUST::Apps::HmmCleaner command, for some reason some files are created into the home directory and when I look into the log file I see that something is wrong at this moment :
! Installing Bio::MUST::Core::Utils failed. See /beegfs/home/me/.cpanm/work/1580931498.36405/build.log for details. Retry with --force to force install it.
Warning: unable to close filehandle $out properly: Disk quota exceeded at /beegfs/data/me/perl-5.30.1/localperl/bin/cpanm line 49.
Warning: unable to close filehandle $out properly: Disk quota exceeded at /beegfs/data/me/perl-5.30.1/localperl/bin/cpanm line 49.
Warning: unable to close filehandle $out properly: Disk quota exceeded at /beegfs/data/me/perl-5.30.1/localperl/bin/cpanm line 49.
But when I look into the disk quota in data, both memory and chuck file limit is not reached, but for the home the number of chunk files is exceeded!
Does someone know how can I force to run all the files created in the installation into the data repository instead of home?
Thank you for your help.
for polarbear :
When I do :
/beegfs/data/me/perl-5.30.1/localperl/bin/cpan -D local::lib
I get :
Loading internal logger. Log::Log4perl recommended for better logging
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.
Would you like to configure as much as possible automatically? [yes] yes
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/beegfs/home/me/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/beegfs/home/me/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Thu, 06 Feb 2020 08:41:03 GMT
.............
New CPAN.pm version (v2.27) available.
[Currently running version is v2.22]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/beegfs/home/me/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /beegfs/home/me/.cpan/Metadata
local::lib
-------------------------------------------------------------------------
(no description)
H/HA/HAARG/local-lib-2.000024.tar.gz
(no installation file)
Installed: not installed
CPAN: 2.000024 Not up to date
Graham Knop (HAARG)
haarg#haarg.org
Lets follow next scenario
mv ~/.cpam /beegfs/data/me
ln -s /beegfs/data/me/.cpan ~/.cpan
HOME=/beegfs/data/me perl -Mlocal::lib > ~/.lib_perl
these commands will
move $HOME/.cpan directory from $HOME to /beegfs/data/me
symlink it in $HOME directory
run perl with local::lib module
it will check for $SHELL
output configuration variables to $HOME/.lib_perl file
Now source $HOME/.lib_perl in your shell environment according your $SHELL (bash - .bashrc, csh - .cshrc, ...) on login into system.
As you work remotely you have to logout and login to pickup changes (do it in separate terminal just in case if you do something wrong and you need back door to revert your changes).
At this point you should be able to use cpan to install modules into /beegfs/data/me/perl5 directory.
Check if local::lib is installed with following command
cpan -D local::lib
If it is installed then head to following webpage local::lib and do some reading - pay attention to point #4.
Otherwise check if cpanm is available in your system.
As an option you can set variables manually
PERL_MB_OPT
PERL_MM_OPT
PERL5LIB
PATH
PERL_LOCAL_LIB_ROOT
Before setting private library check that you have write permission on storage directory.

jupyter kernelspec no such file or directory /lib/libstdc++.so.6.0.21

I'm trying to flesh out the workflow for a JupyterHub server in the case where a user creates an environment and wants to share it with another user. I want to test out one of the two methods.
I am trying to create an environment in a public path, and then have another user add the conda environment as a kernel. So far it looks like this.
# How the environment is created
jupyter#ip:~$ conda create -p /home/envs/test --clone root
# Current setup
nick {~}$ jupyter kernelspec list
Available kernels:
python3 /opt/conda/share/jupyter/kernels/python3
nick {~}$ conda env list
# conda environments:
#
test /home/envs/test
nenv /home/nick/.conda/envs/nenv
base * /opt/conda
nick {~}$ cat .condarc
envs_dirs:
- /home/envs
My problem is I get an error when I try and install the kernel libstdc++.so.6.0.21 does not exist. What is libstdc++.so.6.0.21?
# error when trying to install kernel
nick {~}$ jupyter kernelspec install --user /home/envs/test
[InstallKernelSpec] Removing existing kernelspec in /home/nick/.local/share/jupyter/kernels/test
Traceback (most recent call last):
File "/opt/conda/bin/jupyter-kernelspec", line 11, in <module>
sys.exit(KernelSpecApp.launch_instance())
File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/kernelspecapp.py", line 273, in start
return self.subapp.start()
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/kernelspecapp.py", line 143, in start
replace=self.replace,
File "/opt/conda/lib/python3.7/site-packages/jupyter_client/kernelspec.py", line 346, in install_kernel_spec
shutil.copytree(source_dir, destination)
File "/opt/conda/lib/python3.7/shutil.py", line 365, in copytree
raise Error(errors)
shutil.Error: [('/home/envs/test/lib/libstdc++.so.6.0.21', '/home/nick/.local/share/jupyter/kernels/test/lib/libstdc++.so.6.0.21', "[Errno 2] No such file or directory: '/home/envs/test/lib/libstdc++.so.6.0.21'")]
Note: I found this question which is similar; however, I found through this github thread why gcc had to be removed, and I already verified that it didn't exist in my environment with:
nick {~}$ conda list --name test | grep 'gcc'
_libgcc_mutex 0.1 main
libgcc 7.2.0 h69d50b8_2
libgcc-ng 8.2.0 hdf63c60_1
I already have libgcc installed at a higher version as you can see above so I didn't think the other answer would do too much good either.
filename shows up as red with this, so I believe the link is broken.
(test) nick {~}$ ls -al /home/envs/test/lib/libstdc++.so.6.0.21
lrwxrwxrwx 1 jupyter jupyter 19 Aug 9 09:42 /home/envs/test/lib/libstdc++.so.6.0.21 -> libstdc++.so.6.0.24
I realized I was using jupyter kernelspec in a non-intended way here. It is not intended to actually create the kernel, but only to add a kernelspec if it exists (see here, at the bottom).
There are two options for writing a kernel:
You can reuse the IPython kernel machinery to handle the communications, and just describe how to execute your code. This is much simpler if the target language can be driven from Python. See Making simple Python wrapper kernels for details.
You can implement the kernel machinery in your target language. This is more work initially, but the people using your kernel might be more likely to contribute to it if it’s in the language they know.
So, in my case what I really wanted to do was use IPythons utilities (option 1 above) which is documented well here. In which case to add the shared conda environment as a kernel in a way the users can access it I just need to run.
su - <user>
conda activate test
python -m ipykernel install --user --name test --display-name "Python (test)"

Sublime Text CoffeeScript build system: `env: node: No such file or directory`

I'm trying to set up a CoffeeScript build system in Sublime Text 3, but I keep getting the following error:
env: node: No such file or directory
[Finished in 0.0s with exit code 127]
[cmd: ['coffee', '-o','/Users/jcourtdemone/Sites/autotempest.com/new_design_sandbox/static/script', '-cw', '/Users/jcourtdemone/Sites/autotempest.com/new_design_sandbox/static/coffee']]
[dir: /Users/jcourtdemone/Sites/autotempest.com/new_design_sandbox/static/coffee]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
My build system looks like this:
{
"name": "Coffee - AT",
"cmd": ["coffee","-o","${project_path:${folder}}/static/script","-cw","${project_path:${folder}}/static/coffee"],
"selector": "source.coffee",
"path":"/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/node_modules/coffee-script/bin"
}
Two things strange about this.
1) It says it's looking in /usr/bin where a symlink to coffee exists.
2) Because of (1), I overrode $PATH to include the actual location of coffee which is /usr/local/lib/node_modules/coffee-script/bin, but for some reason, $PATH isn't being overridden properly, it's sticking with the default $PATH.
Things to note:
i) I've verified that all paths are correct and pass normally through a regular terminal command.
ii) Tried with a "shell": true variable in the build system.
iii) I have another build system for Compass like this that works fine.
Anyone run into similar problems or issues? Any ideas?
In Terminal, type which node, then create a symlink to that location in /usr/bin. For example, if node lives in /usr/local/bin, create the symlink like so:
sudo ln -s /usr/local/bin/node /usr/bin/node
If you look at the source of your coffee script, you'll probably find that the first line is something along the lines of:
#!/usr/bin/env node
Exit code 127 in Sublime means that an env command has failed - so in your case, the build system is finding coffee, but it can't execute it because the node binary isn't in Sublime's default search path.
There are two ways to redefine the default search path for Sublime. The first (and easiest) is to always open it from the command line using the built-in subl command. If you're an OS X power user and don't mind messing with important system settings, check out my post on unix.SE on how to alter the default /usr/bin:/bin:/usr/sbin:/sbin path that you're seeing. Be forewarned that if you don't do things correctly, you may break your system. However, if you're running Mountain Lion (10.8.X) and you follow the instructions exactly, everything should be fine. (I haven't upgraded to Mavericks, so no guarantees on whether it'll work with that version.)
How to solve the problem under an Ubuntu System
The fact is "coffee" command will call /usr/bin/node to continue its work, however, the original "node" command for the node application on an Ubuntu system is changed from "node" to "nodejs" to avoid name conflicting. That is the reason, the shell will compliant you "/usr/bin/env: node: No such file or directory". whenever you type
$ coffee
To solve the bug, just let the shell find something named "node" in its default searching path, and this so-called "node" will promote nodejs. The command "nodejs" lies under path of /usr/bin/nodejs.
We will use symbol link to link "node" with nodejs, and place the link "node" within the default searching path, so that the shell will find it.
sudo ln -s /usr/bin/nodejs /usr/bin/node
But beware, make sure that you do NOT have another "node" command under /usr/bin/, you can check it by try to run
$ which node
I do NOT know what to do if you have installed another "node" application.
In Ubuntu you can install the package nodejs-legacy
sudo apt-get install nodejs-legacy
this package just create a symbolic link to binary nodejs
You should be able to fix this all in your build system without needing to add a symlink on your machine.
For example if node lives in /usr/local/bin/node all you have to do is change the path in your build_system to be:
"path": "/usr/local/bin:$PATH"
I had the same problem with Sublime Text 2.
Creating this sublime build worked for me:
{
"cmd": ["coffee", "-c", "$file"],
"selector" : "source.coffee",
"path" : "/usr/local/lib/node_modules/coffee-script/bin/:/usr/local/bin:$PATH"
}
The following code worked for me in Ubuntu 14.04:
**$ sudo apt-get install NodeJS-legacy**
The other problem was the version checking frameworks such as for e.g: gulp -v the same code also solved this problem.
Type the next in the console:
sudo ln -s /usr/bin/nodejs /usr/bin/node

schroot is giving error on centos 6

When I'm using command: schroot -c 32bit -- bash --login -c "rm -rf ~/SC32 ;"
I'm getting these errors:
E: 20copyfiles: cp: cannot create regular file `/var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce/etc/resolv.conf': No such file or directory
E: 32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce: Chroot setup failed: stage=setup-start
Since i'm new to Linux Environment i don't know what to do to solve this error.
The Cent OS which I'm using is 6.3 with x64 architecture
Also i have configured 32bit in /etc/schroot/schroot.conf as
[32bit]
type=directory
description=CentOS 6.3 32bit
directory=/chroot/32bit
users=temp
root-groups=root
personality=linux32
Also I Have this directory available /chroot/32bit
I'm not the root user of the system.
Can anybody tell me what to do to resolve this error?
To debug problems with schroot, try running it verbosely:
schroot -v
or to make it really verbose
schroot -v --debug=notice
The actual failure here is to copy /etc/resolv.conf. There are two potential reasons for this
The source file isn't copyable. Normally unlikely, but try cp and cat by hand to check.
The destination doesn't exist. This is the usual cause of such errors.
Your chroot is /chroot/32bit and it's being (bind) mounted on /var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce. If /chroot/32bit/etc does not exist, then /var/lib/schroot/mount/32bit-dcc62f68-de18-4d2a-95d9-b71f0be314ce/etc won't exist either, and so the copy operation will fail. You must have a proper system available under /chroot/32bit with all the usual directories (/bin, /etc, /lib etc.).
Assuming that you do have a proper chroot in /chroot/32bit, then something has gone wrong during setup. Running with verbose or debug messages enabled may shed some light on the cause of the failure.
Regards,
Roger
(schroot author)
I followed #Roger 's solution and all is well. But I found another workaround solution:
Enter your schroot directory, maybe like this location: /chroot/32bit, you can find this path in "/etc/schroot/schroot.conf" setting file.
cd /chroot/32bit
mv /chroot/32bit/etc/resolv.conf /chroot/32bit/etc/resolv.conf.bk
Then you can try your schroot login command and check is success.
schroot -c 32bit
(32bit)WDan#linux-buildy01:~$
Enjoy it!