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

Hi,

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.

Thanks,
Vijay

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 http://www.swi-prolog.org/build/macos.txt

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 archive4pl.so
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/archive4pl.so] 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 LibUUID (missing: LIBUUID_INCLUDE_DIR UUID_LIBRARY)
-- 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,
Vijay

Have fun ! Beware, addictive SW !

2 Likes

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.