NanoComp / libctl

Guile-based library implementing flexible control files for scientific simulations
GNU General Public License v2.0
18 stars 22 forks source link

Unable to build MPB: No rule to make target 'sphere_quad', needed by 'sphere-quad.h'. #2

Closed Monopoly4u closed 9 years ago

Monopoly4u commented 9 years ago

I get the following error when I try running make in mpb-1.5:

make all-recursive make[1]: Entering directory '/lib/mpb/mpb-1.5' Making all in src make[2]: Entering directory '/lib/mpb/mpb-1.5/src' cp -f mpbconf.h mpb.h make all-recursive make[3]: Entering directory '/lib/mpb/mpb-1.5/src' Making all in util make[4]: Entering directory '/lib/mpb/mpb-1.5/src/util' make[4]: * No rule to make target 'sphere_quad', needed by 'sphere-quad.h'. Stop. make[4]: Leaving directory '/lib/mpb/mpb-1.5/src/util' Makefile:535: recipe for target 'all-recursive' failed make[3]: * [all-recursive] Error 1 make[3]: Leaving directory '/lib/mpb/mpb-1.5/src' Makefile:391: recipe for target 'all' failed make[2]: * [all] Error 2 make[2]: Leaving directory '/lib/mpb/mpb-1.5/src' Makefile:408: recipe for target 'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]: Leaving directory '/lib/mpb/mpb-1.5' Makefile:339: recipe for target 'all' failed make: *\ [all] Error 2

What should I do to resolve the problem? Also, here's my system info:

$ uname -a CYGWIN_NT-6.1 Oreo 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64 Cygwin

stevengj commented 9 years ago

(This issue belongs on the MPB github page, not on libctl.)

The cp command looks suspicious to me; it doesn't seem like you are building in the standard way. What happens if you download the .tar.gz file from the MPB website, unpack it, and type

./configure && make

?

Monopoly4u commented 9 years ago

(Ahh, I apologize. I didn't see that one existed specifically for MPB.)

I cleared out my "mpb" folder and tried again after re-downloading from the MPB website, and this is what I got:

$ ./configure && make checking whether to enable maintainer-specific portions of Makefiles... no checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking build system type... x86_64-unknown-cygwin checking host system type... x86_64-unknown-cygwin checking how to print strings... printf checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 8192 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-cygwin file names to x86_64-unknown-cygwin format... func_convert_file_noop checking how to convert x86_64-unknown-cygwin file names to toolchain format... func_convert_file_noop checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL checking for dlltool... dlltool checking how to associate runtime and link libraries... func_cygming_dll_for_implib checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... no checking if : is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... ./configure: line 8162: diff: command not found no checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes checking dynamic linker characteristics... Win32 ld.exe checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking for g77... no checking for xlf... no checking for f77... no checking for frt... no checking for pgf77... no checking for cf77... no checking for fort77... no checking for fl32... no checking for af77... no checking for xlf90... no checking for f90... no checking for pgf90... no checking for pghpf... no checking for epcf90... no checking for gfortran... gfortran checking whether we are using the GNU Fortran 77 compiler... yes checking whether gfortran accepts -g... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... no checking whether to build static libraries... yes checking for gfortran option to produce PIC... -DDLL_EXPORT checking if gfortran PIC flag -DDLL_EXPORT works... yes checking if gfortran static flag -static works... no checking if gfortran supports -c -o file.o... yes checking if gfortran supports -c -o file.o... (cached) yes checking whether the gfortran linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes checking dynamic linker characteristics... Win32 ld.exe checking how to hardcode library paths into programs... immediate checking for vendor cc to be used instead of gcc... checking for cc... gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) gcc3 checking for sqrt in -lm... yes checking how to get verbose linking output from gfortran... -v checking for Fortran 77 libraries of gfortran... -L/usr/local/lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3 -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/lib -L/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../.. -lm -lgfortran -lquadmath -lcygwin -ladvapi32 -lshell32 -luser32 checking for dummy main to link with Fortran 77 libraries... none checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore checking for fftwexecute in -lfftw3... yes checking if sgemm is being linked in already... no checking for sgemm_ in -lopenblas... no checking for ATLxerbla in -latlas... no checking for sgemm in -lblas... yes checking for dgemm in -ldgemm... no checking for sgemm in -lmkl... no checking for sgemm in -framework vecLib... no checking for sgemm in -lcxml... no checking for sgemm in -ldxml... no checking for sgemm in -lscs... no checking for sgemm in -lcomplib.sgimath... no checking for sgemm in -lblas... (cached) yes checking for sgemm in -lessl... no checking for sgemm in -lblas... (cached) yes checking for cheev... no checking for cheev in -llapack... yes checking for deflate in -lz... yes checking for H5Pcreate in -lhdf5... yes checking hdf5.h usability... yes checking hdf5.h presence... yes checking for hdf5.h... yes checking for guile... yes checking for guile-config... guile-config checking if linking to guile works... yes checking libguile.h usability... yes checking libguile.h presence... yes checking for libguile.h... yes checking guile/gh.h usability... yes checking guile/gh.h presence... yes checking for guile/gh.h... yes checking for scm_make_smob_type... yes checking for scm_array_get_handle... yes checking for scm_is_array... yes checking for SCM_SMOB_PREDICATE... yes checking for SCM_SMOB_DATA... yes checking for SCM_NEWSMOB... yes checking how to activate readline in Guile... ice-9 readline checking for libctl dir... /usr/local/share/libctl checking for gen-ctl-io... gen-ctl-io checking for ctl_get_vector3 in -lctl... yes checking ctl.h usability... yes checking ctl.h presence... yes checking for ctl.h... yes checking whether libctl version is at least 3.2.1... ok checking for libctl_quiet feature... yes checking for basename in -lgen... no checking nlopt.h usability... no checking nlopt.h presence... no checking for nlopt.h... no checking for nlopt_minimize in -lnlopt... no checking for ANSI C header files... (cached) yes checking for unistd.h... (cached) yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking for nlopt.h... (cached) no checking for an ANSI C-conforming const... yes checking for inline... inline checking for getopt... yes checking for strncmp... yes checking whether calling BLAS zdotc works... yes checking for bash... /usr/bin/bash checking for feenableexcept... yes checking whether feenableexcept declaration is usable... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating examples/Makefile config.status: creating tests/Makefile config.status: creating src/Makefile config.status: creating src/util/Makefile config.status: creating src/matrices/Makefile config.status: creating src/matrixio/Makefile config.status: creating src/maxwell/Makefile config.status: creating mpb/Makefile config.status: creating mpb/mpb.scm config.status: creating mpb/mpb-split-preinstall config.status: creating utils/Makefile config.status: creating config.h config.status: creating src/mpbconf.h config.status: executing depfiles commands config.status: executing libtool commands make all-recursive make[1]: Entering directory '/lib/mpb/mpb-1.5' Making all in src make[2]: Entering directory '/lib/mpb/mpb-1.5/src' cp -f mpbconf.h mpb.h make all-recursive make[3]: Entering directory '/lib/mpb/mpb-1.5/src' Making all in util make[4]: Entering directory '/lib/mpb/mpb-1.5/src/util' make[4]: * No rule to make target 'sphere_quad', needed by 'sphere-quad.h'. Stop. make[4]: Leaving directory '/lib/mpb/mpb-1.5/src/util' Makefile:535: recipe for target 'all-recursive' failed make[3]: * [all-recursive] Error 1 make[3]: Leaving directory '/lib/mpb/mpb-1.5/src' Makefile:391: recipe for target 'all' failed make[2]: * [all] Error 2 make[2]: Leaving directory '/lib/mpb/mpb-1.5/src' Makefile:408: recipe for target 'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]: Leaving directory '/lib/mpb/mpb-1.5' Makefile:339: recipe for target 'all' failed make: *\ [all] Error 2

Here's a bit more information about my setup. I'm completely new to Cygwin, so I apologize for making any blatantly obvious rookie mistakes.

When installing Cygwin, I made sure to include BLAS, LAPACK, HDF5, FFTW, Readline, and Guile from the installation manager noting to include any "-dev" packages related to these programs, and these are located at the top level in my "/bin", "/dev", and "/lib" folders. "libctl" was installed in "/usr/local", but both libctl and mpb-1.5 were unpacked in the same "/lib" folder where all the other programs are located. I've used

$ export LDFLAGS="-L/usr/local/lib" $ export CPPFLAGS="-I/usr/local/include"

in order to get MPB's ./configure script to recognize where libctl's shared libraries are, but I have not set any path variables. Also, I've only run commands as root where specifically noted on the libctl and MPB installation pages (which was only once for the "make install" of libctl).

stevengj commented 9 years ago

You should notice that mpb-1.5/src/util/sphere-quad.h is included with mpb-1.5.tar.gz. Are the timestamps on your filesystem messed up so that it thinks that this file is out of date?

Monopoly4u commented 9 years ago

I see that sphere-quad.h is indeed located in the mpb-1.5 folder as you've stated.

Here is the output for "$ stat /lib/mpb" and "$ stat /lib/mpb/mpb-1.5/src/util/sphere-quad.h" respectively:

File: ‘/lib/mpb’ Size: 0 Blocks: 0 IO Block: 65536 directory Device: 90baffaah/2428174250d Inode: 1688849860448534 Links: 1 Access: (0755/drwxr-xr-x) Uid: ( 1000/ Jed) Gid: ( 513/ None) Access: 2014-12-14 07:03:10.963331300 -0600 Modify: 2014-12-14 07:03:10.963331300 -0600 Change: 2014-12-14 07:03:10.963331300 -0600 Birth: 2014-12-13 14:18:04.813358000 -0600

$ stat /lib/mpb/mpb-1.5/src/util/sphere-quad.h File: ‘/lib/mpb/mpb-1.5/src/util/sphere-quad.h’ Size: 6276 Blocks: 8 IO Block: 65536 regular file Device: 90baffaah/2428174250d Inode: 16607023626003576 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 1000/ Jed) Gid: ( 513/ None) Access: 2014-12-14 07:03:11.043331400 -0600 Modify: 2014-03-28 13:41:24.000000000 -0500 Change: 2014-12-14 07:03:11.043331400 -0600 Birth: 2014-12-14 07:03:11.043331400 -0600

Based on this, I don't believe that the timestamps are out of date, and this same information is shown in Windows Explorer when I check these two locations.

stevengj commented 9 years ago

Oh, I think I see the problem: on Windows, it builds sphere_quad.exe, not sphere_quad. Try editing src/util/Makefile to change the line sphere-quad.h: sphere_quad to sphere-quad.h: $(SPHERE_QUAD)$(EXEEXT)

I'll push a patch to ensure that sphere-quad.h doesn't get accidentally rebuilt in the future.

Monopoly4u commented 9 years ago

In that directory, there are two files named "Makefile", an AM file and an IN file. After configuration, a third Makefile comes in as well. I started over with a fresh unpack of mpb-1.5 and edited both the AM and IN files to the new line as you stated, and then I checked the third Makefile and found that the line was the same as both the AM and IN files. I then proceeded to make, but I received a similar error as before:

$ make make all-recursive make[1]: Entering directory '/lib/mpb/mpb-1.5' Making all in src make[2]: Entering directory '/lib/mpb/mpb-1.5/src' cp -f mpbconf.h mpb.h make all-recursive make[3]: Entering directory '/lib/mpb/mpb-1.5/src' Making all in util make[4]: Entering directory '/lib/mpb/mpb-1.5/src/util' make[4]: * No rule to make target '../../src/util/sphere_quad.exe', needed by 'sphere-quad.h'. Stop. make[4]: Leaving directory '/lib/mpb/mpb-1.5/src/util' Makefile:535: recipe for target 'all-recursive' failed make[3]: * [all-recursive] Error 1 make[3]: Leaving directory '/lib/mpb/mpb-1.5/src' Makefile:391: recipe for target 'all' failed make[2]: * [all] Error 2 make[2]: Leaving directory '/lib/mpb/mpb-1.5/src' Makefile:408: recipe for target 'all-recursive' failed make[1]: * [all-recursive] Error 1 make[1]: Leaving directory '/lib/mpb/mpb-1.5' Makefile:339: recipe for target 'all' failed make: *\ [all] Error 2

stevengj commented 9 years ago

(I meant for you to just edit the Makefile after configure runs. You shouldn't edit Makefile.am unless you are configured with --enable-maintainer-mode and have the GNU autotools installed.)

Something is not making sense here. There should be lines in the Makefile like:

sphere_quad$(EXEEXT): $(sphere_quad_OBJECTS) $(sphere_quad_DEPENDENCIES) $(EXTRA_sphere_quad_DEPENDENCIES)
        @rm -f sphere_quad$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(sphere_quad_OBJECTS) $(sphere_quad_LDADD) $(LIBS)

which are the rule to make sphere_quad (or sphere_quad.exe on Windows).

Monopoly4u commented 9 years ago

I cleaned out the mpb folder and started again, only editing the Makefile that appears after running configure, but I received the same error.

There are indeed those lines in the Makefile that gets created from configure.

stevengj commented 9 years ago

What does make --version report?

Monopoly4u commented 9 years ago

Typing make --version gets me this:

Jed@Oreo /lib/mpb/mpb-1.5 $ make --version GNU Make 4.0 Built for x86_64-pc-cygwin Copyright (C) 1988-2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

stevengj commented 9 years ago

I think I made a mistake in the dependency above: try changing the line in the Makefile to sphere-quad.h: sphere_quad$(EXEEXT)

Monopoly4u commented 9 years ago

That seems to have solved the problem. Thanks for all your help!

stevengj commented 9 years ago

Great! (This fix will be in the next release.)