Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make install fails while using make binary #317

Closed
jfqd opened this issue Nov 23, 2016 · 5 comments
Closed

make install fails while using make binary #317

jfqd opened this issue Nov 23, 2016 · 5 comments
Milestone

Comments

@jfqd
Copy link

jfqd commented Nov 23, 2016

I followed the advice to build mosquitto without documentation by using make binary, but the install fails. Even wen I use make install binary

install: cannot stat 'mosquitto.8': No such file or directory
gmake[1]: *** [install] Error 1

The build script can be found here: build/mosquitto/build.sh

What am I doing wrong?

@jbreitbart
Copy link
Contributor

cmake ..
make instal

also fails with a similar error:

$ make install
[ 33%] Built target libmosquitto
[ 37%] Built target mosquittopp
[ 42%] Built target mosquitto_sub
[ 48%] Built target mosquitto_pub
[100%] Built target mosquitto
Install the project...
-- Install configuration: ""
-- Installing: /tmp/etc/mosquitto/mosquitto.conf
-- Installing: /tmp/etc/mosquitto/aclfile.example
-- Installing: /tmp/etc/mosquitto/pskfile.example
-- Installing: /tmp/etc/mosquitto/pwfile.example
-- Installing: /tmp/lib/libmosquitto.so.1.4.10
-- Installing: /tmp/lib/libmosquitto.so.1
-- Installing: /tmp/lib/libmosquitto.so
-- Set runtime path of "/tmp/lib/libmosquitto.so.1.4.10" to "/tmp/lib"
-- Installing: /tmp/include/mosquitto.h
running /sbin/ldconfig 2>&1
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
-- Installing: /tmp/lib/libmosquittopp.so.1.4.10
-- Installing: /tmp/lib/libmosquittopp.so.1
-- Installing: /tmp/lib/libmosquittopp.so
-- Set runtime path of "/tmp/lib/libmosquittopp.so.1.4.10" to "/tmp/lib"
-- Installing: /tmp/include/mosquittopp.h
running /sbin/ldconfig 2>&1
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
-- Installing: /tmp/bin/mosquitto_pub
-- Set runtime path of "/tmp/bin/mosquitto_pub" to "/tmp/lib"
-- Installing: /tmp/bin/mosquitto_sub
-- Set runtime path of "/tmp/bin/mosquitto_sub" to "/tmp/lib"
-- Installing: /tmp/sbin/mosquitto
-- Set runtime path of "/tmp/sbin/mosquitto" to "/tmp/lib"
-- Installing: /tmp/include/mosquitto_plugin.h
running /sbin/ldconfig 2>&1
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
CMake Error at man/cmake_install.cmake:36 (file):
  file INSTALL cannot find
  "/home/jbreitbart/tmp/mosquitto/man/mosquitto_passwd.1".
Call Stack (most recent call first):
  cmake_install.cmake:49 (include)


Makefile:93: recipe for target 'install' failed
make: *** [install] Error 1

a temporary work-a-round is to manually call make in the man directory, but this seems not to be documented and is kind of irritating. We are using CMake to build mosquitto as an external project and this complicates our CMake. Any chance this will be fixed in mosquitto itself?

@memegraf
Copy link

memegraf commented Dec 23, 2016

Hi there,

i am trying to make mosquitto from source. after running "make install" some files get installed, but not the main mosquitto.
the console just gives me "mosquitto_passwd mosquitto_pub mosquitto_sub" as possible commands, but not mosquitto itself.

same thing happens when i use the compressed package from the mosquitto website instead of the git repository:

me@me ~/Downloads/mosquitto-1.4.10 $ mos
mosquitto_passwd  mosquitto_pub     mosquitto_sub     
me@me ~/Downloads/mosquitto-1.4.10 $ mosquitto_pub
mosquitto_pub: error while loading shared libraries: libmosquitto.so.1: cannot open shared object file: No such file or directory

now i am in a state of "no idea what to do next" so i would really appreciate some help.

i attached the console output for reference.
konsole_example.txt

what did i do so far:

by following the description from
https://goochgooch.wordpress.com/2014/08/01/building-mosquitto-1-4/ i resolved
most of the dependencies. what is missing now is the correct docbook-xls to build it with docs from the git repository

so i used "make binary".
"make test" fails,

make[3]: Leaving directory '/home/me/git_repos/mosquitto/test/broker/c'
./01-connect-success.py
Traceback (most recent call last):
  File "./01-connect-success.py", line 16, in <module>
    connect_packet = mosq_test.gen_connect("connect-success-test", keepalive=keepalive)
  File "/home/me/git_repos/mosquitto/test/mosq_test.py", line 281, in gen_connect
    rl = pack_remaining_length(remaining_length)
  File "/home/me/git_repos/mosquitto/test/mosq_test.py", line 379, in pack_remaining_length
    s = s + struct.pack("!B", byte)
TypeError: Can't convert 'bytes' object to str implicitly
Makefile:18: recipe for target '01' failed

therefore i tried

cd <SRC>/org.eclipse.mosquitto/test/broker
../../src/mosquitto -p 1888

which starts the test broker at least after adding

# lib64c default configuration
/usr/local/lib64

to
/etc/ld.so.conf.d/lib64c.conf

and executing "sudo ldconfig" (it did not find the ssl lib without this change)

after executing "make install" i am stuck.

@PierreF
Copy link
Contributor

PierreF commented Jan 2, 2018

make binary should works as described: it won't build documentation.
But make install will still try to install documentation. There is a WITH_DOCS=no (yes is the default value) which should fix your issue.

@ralight : shouldn't we suggest usage of WITH_DOCS ? (and probably document other WITH_* in readme). While at this, install target shouldn't depend on $(MAKE_ALL) instead of just mosquitto ?

@kolewu
Copy link

kolewu commented Apr 16, 2018

WITH_DOCS is only supported when using the Makefile buildsystem not when using CMake. There is a commit that changes this on the devel branch 3163cf2.

May I suggest to merge this one into master to fix the cmake build problems?

@ralight ralight added this to the 1.5 milestone Apr 16, 2018
@ralight
Copy link
Contributor

ralight commented Apr 16, 2018

@kolewu The develop branch will become the master branch once version 1.5 is out, which will not be long. As it is already in that branch I'm going to close this.

@ralight ralight closed this as completed Apr 16, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants