netCDF make command test? - linux

I need to install netCDF and graDs in linux to be able to run another program ,
but I am not familiar with them , I have just configured and make them but I didn't get any message which contains : successfully make or sth like that.
output of Make :
make[3]: Entering directory `/home/nazanin/Downloads/netcdf-4.3.0/examples/C'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/nazanin/Downloads/netcdf-4.3.0/examples/C'
Making all in CDL
make[3]: Entering directory `/home/nazanin/Downloads/netcdf-4.3.0/examples/CDL'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/nazanin/Downloads/netcdf-4.3.0/examples/CDL'
make[3]: Entering directory `/home/nazanin/Downloads/netcdf-4.3.0/examples'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/nazanin/Downloads/netcdf-4.3.0/examples'
make[2]: Leaving directory `/home/nazanin/Downloads/netcdf-4.3.0/examples'
make[2]: Entering directory `/home/nazanin/Downloads/netcdf-4.3.0'
make[2]: Leaving directory `/home/nazanin/Downloads/netcdf-4.3.0'
make[1]: Leaving directory `/home/nazanin/Downloads/netcdf-4.3.0'
Does it mean that the "make" command worked properly,or there is sth wrong? and is there any "test" for it?
I am a very beginner in Ubuntu linux.
Thank you.

Its better for you to install netCDF and graDs by following commands :
sudo apt-get update
sudo apt-get install netcdf*
sudo apt-get install grads

Since you are compiling with autotools, you would typically use make check to run the tests. Please note that there is a known failure in the DAP tests for versions 4.3.0 through 4.3.1.1, related to a change in the Unidata netcdf test servers.
I will mention that netcdf 4.3.0 is fairly old. The latest stable release, v4.3.1.1 may be downloaded here:
http://github.com/Unidata/netcdf-c/releases
There is also a release candidate for the next release, v4.3.2 available, and a second release candidate should be available later today or tomorrow. There have been a number of bug fixes since 4.3.0 that you may be interested in :).

Yes your make work correctly.
To test, try make check.
To install, try make install.

Related

Problems building driver on Linux kernel 5.8.x

I'm working with a Linux driver that is building on v5.7.x kernels but not on the latest v5.8.x releases.
To summarise, most of the driver is pre-built and the kernel interface is built on the target. This involves a make -f Kbuild command.
Having checked all of the relevant kernel interface files for any changes that would affect us, normally the driver would just build as usual on a new kernel. However, this time we get the following error:
make[2]: *** [scripts/Makefile.modpost:111: /path/to/source/Module.symvers] Error 1
make[1]: *** [Makefile:1669: modules] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.8.0-1.el8.elrepo.x86_64'
make: *** [Kbuild:26: default] Error 2
This is from CentOS 8.1, but the same error has been seen on Ubuntu 20.04.
I am no expert on this so interpreting these errors is a bit difficult. I have tried building with the KBUILD_VERBOSE flag and it doesn't really provide any useful information, other than the build succeeding until this point.
On previous kernels the Module.symvers file would be created but empty. On 5.8 this file is not created at all presumably due to this error. As a result, the .ko file is not created.
Finally, if we drop in the source files rather than the pre-built .o files the build does succeed. These .o files are built with a very old version of GCC (4.4.7) but we have also tried building with a much newer version (8.3.1), the same version as the target machine.
I would appreciate suggestions for things to check. Let me know if any other details would help.
Edit:
I ran make on Makefile.modpost manually and got the following output:
sudo make -f ./scripts/Makefile.modpost
WARNING: Symbol version dump "vmlinux.symvers" is missing.
Modules may not have dependencies or modversions.
make -f /scripts/Makefile.modfinal
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-050800-generic'
make[1]: /scripts/Makefile.modfinal: No such file or directory
make[1]: *** No rule to make target '/scripts/Makefile.modfinal'. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-050800-generic'
make: *** [scripts/Makefile.modpost:117: __modpost] Error 2
I am answering my own question in case it helps anyone else with this problem. Although it has never been an issue in the past, we've always had a warning that the corresponding .o.cmd file was not present for our .o_shipped files. This appears to be important in kernel 5.8 onwards and my fix was to add a touch command to the Kbuild file (i.e. "touch .driver.o.cmd"). This does not remove the warning but it allows the driver to build as normal.

Makefile in Linux error: *** No rule to make target `all'. Stop

I'm installing Apache on my Linux server RedHat 6.4.
I follow the following guide: http://squirrelmail.org/docs/admin/admin-3.html
When executing the make file, i got the following error:
Making all in srclib
make[1]: Entering directory `/usr/local/src/httpd-2.4.20/srclib'
make[1]: *** No rule to make target `all'. Stop.
make[1]: Leaving directory `/usr/local/src/httpd-2.4.20/srclib'
make: *** [all-recursive] Error 1
Can you please suggest how I can proceed further?
SquirrelMail is in the epel.repo https://fedoraproject.org/wiki/EPEL
yum install epel-release-6-8.noarch.rpm
https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install squirrelmail
Im facing this recently and manage to solved it.. below is the solution i made.
go to srclib folder in httpd
create new file as "Makefile.in"
the content will be like this
BUILD_SUBDIRS = $(AP_BUILD_SRCLIB_DIRS)
CLEAN_SUBDIRS = $(AP_CLEAN_SRCLIB_DIRS)
include $(top_builddir)/build/rules.mk
and save it.
Now you can run make command in httpd folder

Toolchain binaries cannot be found

Trying to build recent version of u-boot bootloader for my mini2440 ARM board I managed to download a toolchain package from codesourcery and extract it to following path: /usr/local/arm-2008q3/
I also exported following values for current session:
export PATH=$PATH:/usr/local/arm-2008q3/bin
export CROSS_COMPILE=arm-none-linux-gnueabi-
When I run make I get a following output and I cant figure out why:
make: arm-none-linux-gnueabi-gcc: Command not found
for dir in tools examples api_examples ; do make -C $dir _depend ; done
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/deth/uboot/mini2440/tools'
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/examples'
/bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
I double checked everything and binaries indeed reside in mentioned folder but... Please explain where I'm wrong.
Well, after almost three days of headbanging into the wall I managed to solve this. To be honest I might have never solved it if occasionally hadn't installed the COdesourcery toolchain with executable installer which they also provide. After doing that the manually unpacked version started to execute! This of course led to a conclusion that there were libraries missing. I tried to reproduce the problem on separate virtual machine and voila, here are couple of words that solved the whole issue:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
Hope this will help someone, and thanks to everyone for help!

Linux 3.13 Kernel Fails to Compile

After configuring various options inside .conf using
$make config
I try to compile the entire linux kernel using
$make
However it throws an error as below:
root#localbox:/LinuxKernel/linux-3.13# make
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
root#localbox:/LinuxKernel/linux-3.13#
I tried to search for .conf by using:
$find -name ".conf"
However it turns up no results. But since make config worked I assume .config must exist somewhere.
Please advise me on how to overcome this annoying problem. I am doing this for the first time and I am not sure if there are any dependencies that have to be installed before trying to compile the kernel. Your feedbacks are highly appreciated.
There must have been some error with make config, e.g. disk full or you aborted it with Ctrl-C. The .config file (not .conf) is right in the main directory.
The error message says it already
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
There are several textbased (config, oldconfig, menuconfig) and graphical (xconfig, gconfig) configuration programs. You might want to pick a graphical one and run it, e.g.
make gconfig
These graphical configurators also help to avoid all the hundreds of irrelevant questions. When you're done selecting the needed options, don't forget to save the .config file and try again compiling the kernel and modules.

Error while building glibc

I'm trying to install glibc to debug a C-framework I'm working on. But, I'm getting an error in the build process. Here's the error msg:
make[3]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
/usr/bin/install -c /root/glibc-2.14-build/elf/ld.so /usr/local/myglibc/lib/ld-2.14.so.new
mv -f /usr/local/myglibc/lib/ld-2.14.so.new /usr/local/myglibc/lib/ld-2.14.so
/usr/bin/install -c /root/glibc-2.14-build/libc.so /usr/local/myglibc/lib/libc-2.14.so.new
mv -f /usr/local/myglibc/lib/libc-2.14.so.new /usr/local/myglibc/lib/libc-2.14.so
echo ld-2.14.so /usr/local/myglibc/lib/ld-linux-x86-64.so.2 >> /root/glibc-2.14-build/elf/symlink.list
/usr/bin/install -c /root/glibc-2.14-build/elf/sotruss-lib.so /usr/local/myglibc/lib/audit/sotruss-lib.so.new
mv -f /usr/local/myglibc/lib/audit/sotruss-lib.so.new /usr/local/myglibc/lib/audit/sotruss-lib.so
make[2]: *** No rule to make target `/root/glibc-2.14-build/dlfcn/libdl.so.2', needed by `/root/glibc-2.14-build/elf/sprof'. Stop.
make[2]: Leaving directory `/root/glibc-source/glibc-2.14/elf'
make[1]: *** [elf/subdir_install] Error 2
make[1]: Leaving directory `/root/glibc-source/glibc-2.14'
make: *** [install] Error 2
Is this a known problem?
I had built glibc on the same machine earlier last week without any errors. I'm rebuilding it because glibc is compiled with optimization level 2(-O2) by default and I'm unable to look into the values of a few variables inside the library functions from the code dump as they've been optimized out. I'm currently trying to compile with optimization level 1.
Thanks
It looks like you are trying to make install, without first doing a successful make all.
This is for the benefit of anyone who might be trying to build glibc on their ubuntu box.
I went through the following problems and resolved them the following way.
These problems were encountered in ubuntu 12.04
I created a directory glib-build on the same level as the glib-VERSION and ran the following command
$> ../glibc-2.16.0/configure --prefix=/home/gugovind/tsapp/glibc/glibc-build/
that gave me the following error that makeinfo is missing.
for that
$>sudo apt-get install texinfo
will resolve the problem.
It threw and error about LD_LIBRARY_PATH having the current directory (even if it does not exist)
for that run the following in your command prompt
$>set LD_LIBRARY_PATH
this will clear the LD_LIBRARY_PATH only for that console temporarily. Then run the configure again.
You might encounter another problem with configure..
"function strtonum never defined"
look at the config.log file and it might be missing mawk or gawk. install them using
sudo apt-get install gawk
This should get you through the configure part.
now run
make all
if in case you encounter a particular file not compiling.. just copy the gcc ... before that and paste it in the command prompt again after you have cd to that directory (the command lines before the error should tell you where to go.)
make install
You might get a warning about not able to find etc/ld.config... file. ignore that..
you are all set now.

Resources