michaelforney / swc

a library for making a simple Wayland compositor
MIT License
614 stars 52 forks source link

Unable to buid swc #38

Closed DmitryHetman closed 7 years ago

DmitryHetman commented 7 years ago

Makefile:62: *** Could not find package wld . Stop. wld installed.

michaelforney commented 7 years ago

Did you try reading the error message?

michaelforney commented 7 years ago

Make sure pkg-config can find your installed wld.

DmitryHetman commented 7 years ago

Package wld was not found in the pkg-config search path. Perhaps you should add the directory containing `wld.pc' to the PKG_CONFIG_PATH environment variable No package 'wld' found

DmitryHetman commented 7 years ago

I did PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig/ but still Makefile:62: *** Could not find package wld . Stop.

DmitryHetman commented 7 years ago

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig works, add it to README.md

DmitryHetman commented 7 years ago

/usr/local/bin/velox: error while loading shared libraries: libswc.so.0: cannot open shared object file: No such file or directory

DmitryHetman commented 7 years ago

Probably better install everything in /usr/lib and /usr/bin

michaelforney commented 7 years ago

I am not going to added common sense instructions about how pkg-config or shared libraries work to README.md.

If you can't figure out pkg-config, just set wld_LIBS and wld_CFLAGS so that the compiler can find wld where you installed it. If you are going to install libswc.so.0 to a directory that is not in your system's library search path, you need to set LD_LIBRARY_PATH or build velox with an rpath including the directory you did install it to.

DmitryHetman commented 7 years ago

Probably you should export PKG_CONFIG_PATH from Makefile. Because by default there is no /usr/local/ Why not use /usr/lib and /usr/bin which is set by default in most distros?

michaelforney commented 7 years ago

PKG_CONFIG_PATH should not be changed in the Makefile. Either the pkg-config files can be found in the system default location, or the user has installed them somewhere else and set PKG_CONFIG_PATH in their shell profile.

Nearly all packages install to /usr/local by default. Distributions often pass --prefix=/usr to configure or PREFIX=/usr to make when they build their packages. If you want the packages to go in /usr, you should do the same.

shawn-peng commented 7 years ago

I don't think the pkg_config is a common sense. It would be much better if you mention it in the instructions.

DmitryHetman commented 7 years ago

I don't think either. In my opinion better use /usr/lib64 for libs /usr/bin for binary /usr/local/lib doesn't even exist in some distros and often just empty.

michaelforney commented 7 years ago

The /usr/local default is a convention used by just about every linux software project I know about (everything that uses autotools defaults to /usr/local as the prefix).

Setting the prefix correctly is the responsibility of the person building the software (e.g. distribution or user). I will not change the default prefix, deviating from this widespread convention, to match one user's preference.