Installation fails with "No rule to make target `man/archive'"


My installation on Mac fails with below error

[ 77%] Generating lib/occurs.tex
[ 77%] Generating lib/ansiterm.tex
[ 77%] Generating lib/readutil.tex
[ 77%] Generating lib/shlib.tex
[ 78%] Generating lib/pureinput.tex
[ 78%] Generating lib/explain.tex
make[2]: *** No rule to make target `man/archive', needed by `man/lib/prologpack.tex'.  Stop.
make[1]: *** [man/CMakeFiles/core.doc.html.dir/all] Error 2
make: *** [all] Error 2

My initial attempt was through swivm

swivm install 8.1.5

This gave the error above.

Turns out there was no bin directory under ~/.swivm/versions/8.1.5/

At this point I decided to build manually and ran

cmake . and then make (from within ~/.swivm/versions/8.1.5/

Again, I get the same error above.

OS: Mac OS High Sierra
cmake version 3.14.3
GNU Make 3.81

Please help.


Did you install the libarchive dependency? Any other complains from CMake?

No, I did not install any dependency manually.
I lost my console output. Where can I find a log file so I can check and see If there was any other error somewhere in the middle?

Just rebuild…

If you re-run cmake it will complain about the stuff it cannot find. See also

1 Like

Thank you.

I installed libarchive
(Also set LDFLAGS and CFLAGS)

Now doc generation seems to be fine but I get a new error

[ 76%] Built target http.doc.html
Scanning dependencies of target nlp.doc.html
[ 76%] Generating nlp.tex
[ 76%] Generating snowball.tex
[ 76%] Generating isub.tex
[ 76%] Generating nlp.html
[ 76%] Built target nlp.doc.html
[ 76%] Built target paxos
[ 77%] Built target paxos.doc.html
[ 77%] Linking C shared module
Undefined symbols for architecture x86_64:
  "_archive_entry_perm", referenced from:
      _archive_header_prop in archive4pl.c.o
  "_archive_read_support_filter_all", referenced from:
      _archive_open_stream in archive4pl.c.o
  "_archive_write_set_format_gnutar", referenced from:
      _archive_open_stream in archive4pl.c.o
  "_archive_write_set_format_iso9660", referenced from:
      _archive_open_stream in archive4pl.c.o
  "_archive_write_set_format_xar", referenced from:
      _archive_open_stream in archive4pl.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [packages/archive/] Error 1
make[1]: *** [packages/archive/CMakeFiles/plugin_archive4pl.dir/all] Error 2
make: *** [all] Error 2

I also find these in the log

-- Could NOT find ODBC (missing: ODBC_INCLUDE_DIR)
-- Optional package Berkeley DB was not found
-- No junit.jar.  Dropping JPL tests.
-- Could NOT find Qt5Widgets (missing: Qt5Widgets_DIR)

None of these missing pieces is vital. Dunno about libarchive. Possibly a wrong version or a mixup from the old cmake run. You can run cmake -U '*' option ... to make it forget about what it found the previous run. Also watch the output and/or search in CMakeCache.txt to see it picked up the right versions. On MacOS you often have to deal with MacOS providing old and/or incompatible libraries with the same name. CMake looks for the Macports and Homebrew installations to find libraries if these are installed in the default location.

Yay! That worked!

Thank you Jan and CapelliC.

Since I started with swivm it seems to be working fine (Don’t know how to verify fully).

Any additional things I need to do or be aware of ?

Thanks again,

Have fun ! Beware, addictive SW !


Author of swivm here, nice that you used it :slight_smile:

Since I started with swivm it seems to be working fine (Don’t know how to verify fully).

?- check_installation. is always a good starting point.

Maybe you could also try to re-install this version with swivm again (just temporarily move ~/.swivm/versions/8.1.5 somewhere else), just to be sure that there is no error with swivm in general.

How could I not? Anne Ogborn recommended it !!

I did run ?- check_installation. and the only warnings were because of missing libs (bdb, odbc, and uuid).

On a side note, the readme says libarchive is optional; may be optional on other platforms but not on mac?

libarchive-dev: Without, you can not unpack and install add-ons.

This is probably a temporary issue. libarchive is for normal operation only required by the package manager (and of course you may use it in your application). It is also an indirect dependency for building the documentation which is mostly done using Prolog programs. Ideally the module structure needs to be improved a bit to avoid this dependency.

I just encountered this same error on Debian (actually Debian within WSL 2).
Installing libarchive-dev fixed it for me.

For the same error on Ubuntu 18.04, installation of libarchive-dev helps solve the similar problem.

Resolve error print on console was:
[ 66%] Built target ssl
make[2]: *** No rule to make target ‘…/man/archive’, needed by ‘man/lib/prologpack.tex’. Stop.
CMakeFiles/Makefile2:2336: recipe for target ‘man/CMakeFiles/core.doc.html.dir/all’ failed
make[1]: *** [man/CMakeFiles/core.doc.html.dir/all] Error 2
Makefile:162: recipe for target ‘all’ failed
make: *** [all] Error 2

The same error does resolve on openSUSE Tumbleweed after installation of libarchive-devel

The output from the console is:

[ 73%] Built target plugin_archive4pl
[ 73%] Built target archive
make[2]: *** No rule to make target 'man/ssl', needed by 'man/lib/prologpack.tex'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:2842: man/CMakeFiles/core.doc.html.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

You need the OpenSSL dependency. I don’t think we have an up-to-date list for the dependencies on OpenSUSE. The Redhat version is probably a good starting point

Wow, thank you Jan for pointing me to the right direction.I had installed the package “openssl” but after installing the “libopenssl-3-devel” package the error is resolved.

Great! After building, especially the first time, you may want to run in Prolog

?- check_installation.

Which runs some tests to see whether all known components and features are present. Also good is to run once more

cmake .

in the build directory to see whether it complains about missing dependencies.

Of course, you may not need everything :slight_smile:

sure after running ?- check_installation. there are some missing libraries I will install in OS and build again.

I have installed all other dependencies it was complaining about,but even after building with these "libuuid-devel ","libuuid-devel-static " and “uuid-devel” installed, it is not able to find the “libUUID” dependency:

Could NOT find LibUUID (missing: LIBUUID_INCLUDE_DIR)