Makefile error when building on Cygwin - makefile

I am installing some NASA's software (HEASoft) from the source code on Cygwin (32-bit) running on Windows 10. Configure ran successfully, but make gives the following errors:
Makefile:26: /home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std: No such file or directory
gmake[2]: *** No rule to make target '/home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std'. Stop.
gmake[2]: Leaving directory 'C:/cygwin/home/Mario/heasoft-6.21/heacore/BUILD_DIR'
make[1]: *** [Makefile:74: heacore] Error 2
make[1]: se sale del directorio '/home/Mario/heasoft-6.21/BUILD_DIR'
make: *** [Makefile:10: all] Error 2
My problem is that the file /home/Mario/heasoft-6.21/heacore/BUILD_DIR/Makefile-std is not found; however, it actually exists and is located in the correct directory. EDIT: here it can be seen that this file exists:
$ ls /home/Mario/heasoft-6.21/heacore/BUILD_DIR
config.guess config.sub hd_config_info headas-init.csh headas-setup.in hmakerc lhea-fixperl Makefile-CCfits
config.log configure hd_install.c headas-init.sh hmake hmakerc.in Makefile Makefile-std
config.status configure.in hd_scanenv headas-setup hmake_hd install-sh Makefile.in
Any clue why this might be happening and how can be solved?

When Cygwin shell is opened cd /cygdrive/c/home/Mario and run make on your project from that directory. I remember I had similar issue when the current directory was /home/foo. I got it solved just changing the directory to /cygdrive/c/home/foo which is definitely is the same directory, but somehow Cygwin's Make likes it better

Related

Makefile:77: *** missing separator. Stop

Hi I am trying to install systemC on WSL2, when I run sudo make I seem to be getting this error
Making all in src
make[1]: Entering directory '/home/ryans/systemc-2.3.4/src'
Makefile:77: *** missing separator. Stop.
make[1]: Leaving directory '/home/ryans/systemc-2.3.4/src'
make: *** [Makefile:557: all-recursive] Error 1
I have looked at answers, solution 1 and solution2 but they don't seem to apply to my case because the file in question do not have a space or a tab at line 77.
Seems like the right way to install systemC on WSL is the run the following commands in the uncompressed .tar folder,
sudo aclocal
sudo automake --add-missing
sudo autoupdate
before making the objdir with the other instructions can be followed here.

How do I tell Cmake where to find gfortran?

I've tried to install DAMASK for study but faced many problems with it. There's nobody at university to help me with these problems, so I'm lookin' for help here.
For installing and working, DAMASK requires Cmake with gcc and gfortran and many programmer things like PETSc, scipy and numpy. I successfully installed all of that using homebrew, but cmake cause trouble. It doesn't seem to find gcc and gfortran at default.
With gcc I used
CC=/usr/bin/gcc
and it worked.
But it doesn't working with FC, 'cause
FC=/usr/bin/gfortran
not working
even
FC=/usr/local/cellar/gcc/10.2.0_4/bin/gfortran-10
not working
ah, I'm using Macos Catalina and the code of the whole errors there:
MacBook-Pro-Andrej:DAMASK admin1$ make spectral
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:4: /lib/petsc/conf/rules: No such file or directory
/var/folders/yb/bvc9yx0s2mx4yts18q2hfblw0000gp/T/tmp.XzJ43HLr/Makefile.petsc:5: /lib/petsc/conf/variables: No such file or directory
make[1]: *** No rule to make target `/lib/petsc/conf/variables'. Stop.
Found PETSC_DIR:
Found PETSC_INCLUDES:
Found PETSC_EXTERNAL_LIB:
Found PETSC_LINKER:
Found MPI Fortran Compiler:
Found MPI C Compiler:
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:109 (project):
No CMAKE_Fortran_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/Users/admin1/DAMASK/CMakeFiles/CMakeOutput.log".
See also "/Users/admin1/DAMASK/CMakeFiles/CMakeError.log".
make: *** [build/spectral] Error 1
I don't know anything in UNIX programming but I was told to do it if I want to write my
thesis and my diploma...
So I'm lookin' for help here...

kicad gcc error no such file or directory

[ 59%] Compiling bitmap2component's resource file
gcc: error: Sanchez/AppData/Roaming/SPB_Data/src/MINGW-Packages/mingw-w64-kicad-git/src/kicad/bitmap2component: No such file or directory
E:\Documents2\MSYSkicadbuild\mingw64\bin\windres.exe: preprocessing failed.
make[2]: *** [bitmap2component/CMakeFiles/bitmap2component.dir/build.make:62: bitmap2component/CMakeFiles/bitmap2component.dir/bitmap2component_rc.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1979: bitmap2component/CMakeFiles/bitmap2comp onent.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Compiled kicad on msys2 followed http://kicad-source-mirror.readthedocs.io/en/latest/Documentation/development/compiling/index.html#building-kicad-from-source
It says there is no such file or directory but there is...
MSYS ~/src/MINGW-Packages/mingw-w64-kicad-git/src/kicad
$ ls
_clang-format cvpcb lib_dxf README.txt
3d-viewer demos new resources
AUTHORS.txt Documentation pagelayout_editor scripting
**bitmap2component** Doxyfile patches scripts
bitmaps_png eeschema pcb_calculator template
CMakeLists.txt gerbview pcbnew TODO.txt
CMakeModules helpers plugins tools
common include polygon uncrustify.cfg
copyright.h INSTALL.txt potrace utils
CTestConfig.cmake kicad qa
this is what is inside bitmap2component
bitmap2cmp_gui.cpp bitmap2component.cpp CMakeLists.txt
bitmap2cmp_gui_base.cpp bitmap2component.h Info.plist
bitmap2cmp_gui_base.fbp bitmap2component.icns
bitmap2cmp_gui_base.h bitmap2component.rc
I must be missing something a path or file idk any help would be appreciated.
ohh not sure if this help figure anything out but it will keep compiling to around 71% and then tell me something about eeschema_kiface error.

linux/scripts/recordmcount: No such file or directory

When I try to make a kernel module of Linux, the following error message appears:
/home/mynfs/linux/scripts/recordmcount: No such file or directory
What's wrong with it?
PS: /home/mynfs/linux/ is the directory my source tree is in.
[root#localhost yiran]# make CONFIG_NFS_ACL_SUPPORT=m -C /home/mynfs/linux M=/home/mynfs/linux/fs/nfs_common modules
make: Entering directory `/home/mynfs/linux'
WARNING: Symbol version dump /home/mynfs/linux/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/mynfs/linux/fs/nfs_common/nfsacl.o
**/bin/sh: /home/mynfs/linux/scripts/recordmcount: No such file or directory**
make[1]: * [/home/mynfs/linux/fs/nfs_common/nfsacl.o] Error 1
make: * [_module_/home/mynfs/linux/fs/nfs_common] Error 2
make: Leaving directory `/home/mynfs/linux'
[root#localhost yiran]# ls /home/mynfs/linux/scripts | grep recordmcount
recordmcount.c
recordmcount.h
recordmcount.pl
I had the same problem, and just making recordmcount solved it partially. There were other scripts/* modules missing.
The following command built all the modules that were missing for me:
cd $(sysroot)/usr/src/linux (in your case it should be /home/mynfs/linux)
make scripts
Then all the scripts modules were built and I had no further problems compiling kernel modules.
you should build recordmcount by doing
make recordmcount
in /home/mynfs/linux/scripts

installing isolated gcc on server without sudo

I have access to a server (but don't have root permissions on there). To cut a long story short the admin won't upgrade to the newer version of gcc that I need, but has suggested that I can just install it locally.
I'm having some issues doing this, despite trying to follow the guide at http://gcc.gnu.org/install/index.html. I want to use the new versions of GMP, MPFR, and MPC that are installed now on the server.
I first go into my home dir on the server then mkdir mygcc which I then cd into (this is to be the build dir and is not a sub-dir of src dir), from there I do
/home/username/gcc-4.6.3/configure --with-gmp="/software/gmp-5.0.5" --with-
gmp-include="/software/gmp-5.0.5/include" --with-gmp-lib="/software/gmp-5.0.5/lib"
--with-mpfr="/software/mpfr-3.1.1" --with-mpfr-include="/software/mpfr-3.1.1/include"
--with-mpfr-lib="/software/mpfr-3.1.1/lib" --with-mpc-include="/home/username/usr/local
/include" --with-mpc-lib="/home/username/usr/local/lib" --prefix="/home/username/mygcc"
--with-local-prefix="/home/username/usr/local"
the src files that I unzipped are at /home/pmxlh1/gcc-4.6.3.
I also made the directories /home/username/usr/include, /home/username/usr/local etc and set the prefix flags to try and install various things there, but it also fails if I just leave those flags out for the same reasons.
When I get to make however it ends with
checking for suffix of object files... configure: error: in `/home/pmxlh1/mygcc/x86_64-
unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/home/pmxlh1/mygcc'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/pmxlh1/mygcc'
make: *** [all] Error 2
Not sure if I'm going about this the correct way? But basically I want to install it in my home/dir and so that it uses the correct GMP/MPFR/MPC not the old versions that maybe lurking elsewhere on the server.
thanks for any help

Resources