jeanguyomarch / eovim

The Enlightened Neovim
https://github.com/jeanguyomarch/eovim/wiki
MIT License
193 stars 3 forks source link

Is it possible to build this on macOS? #25

Closed jamesgecko closed 6 years ago

jamesgecko commented 6 years ago

It it possible to compile this on macOS?

I installed the EFL libraries via the homebrew recipe, as noted in the Enlightenment docs.

When running cmake -DCMAKE_BUILD_TYPE=Release .., I get the following message:

><((°> cmake -DCMAKE_BUILD_TYPE=Release ..
-- Could NOT find eet (missing: EET_LIBRARIES EET_INCLUDE_DIRS)
-- Could NOT find evas (missing: EVAS_LIBRARIES EVAS_INCLUDE_DIRS)
-- Could NOT find ecore_file (missing: ECORE_FILE_LIBRARIES ECORE_FILE_INCLUDE_DIRS)
-- Could NOT find edje (missing: EDJE_LIBRARIES EDJE_INCLUDE_DIRS)
-- Could NOT find efreet (missing: EFREET_LIBRARIES EFREET_INCLUDE_DIRS)
-- Could NOT find elementary (missing: ELEMENTARY_LIBRARIES ELEMENTARY_INCLUDE_DIRS)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ECORE_FILE_LIBRARY
    linked by target "eovim" in directory /Users/james/bin/eovim
EDJE_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
EET_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
EFREET_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
ELEMENTARY_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
    linked by target "imageviewer" in directory /Users/james/bin/eovim/plugins
    linked by target "sizing" in directory /Users/james/bin/eovim/plugins
EVAS_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
    linked by target "imageviewer" in directory /Users/james/bin/eovim/plugins
    linked by target "sizing" in directory /Users/james/bin/eovim/plugins

-- Configuring incomplete, errors occurred!
See also "/Users/james/bin/eovim/build/CMakeFiles/CMakeOutput.log".

Am I missing some libraries?

jeanguyomarch commented 6 years ago

I have recently build and run eovim on macOS, so it is supposed to work. Cmake should find the *.cmake files installed by efl. I think you are missing an environment variable. Can you please add to the environment variablePKG_CONFIG_PATH the path /usr/local/lib/pkgconfig:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"

and then re-run Cmake.

jamesgecko commented 6 years ago

Still getting the same error.

13:39 ~/b/e/build ⭠master?
><((°> echo $PKG_CONFIG_PATH
/usr/local/lib/pkgconfig

13:39 ~/b/e/build ⭠master?
><((°> cmake -DCMAKE_BUILD_TYPE=Release ..
-- Could NOT find eet (missing: EET_LIBRARIES EET_INCLUDE_DIRS)
-- Could NOT find evas (missing: EVAS_LIBRARIES EVAS_INCLUDE_DIRS)
-- Could NOT find ecore_file (missing: ECORE_FILE_LIBRARIES ECORE_FILE_INCLUDE_DIRS)
-- Could NOT find edje (missing: EDJE_LIBRARIES EDJE_INCLUDE_DIRS)
-- Could NOT find efreet (missing: EFREET_LIBRARIES EFREET_INCLUDE_DIRS)
-- Could NOT find elementary (missing: ELEMENTARY_LIBRARIES ELEMENTARY_INCLUDE_DIRS)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ECORE_FILE_LIBRARY
    linked by target "eovim" in directory /Users/james/bin/eovim
EDJE_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
EET_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
EFREET_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
ELEMENTARY_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
    linked by target "imageviewer" in directory /Users/james/bin/eovim/plugins
    linked by target "sizing" in directory /Users/james/bin/eovim/plugins
EVAS_LIBRARY (ADVANCED)
    linked by target "eovim" in directory /Users/james/bin/eovim
    linked by target "imageviewer" in directory /Users/james/bin/eovim/plugins
    linked by target "sizing" in directory /Users/james/bin/eovim/plugins

-- Configuring incomplete, errors occurred!
See also "/Users/james/bin/eovim/build/CMakeFiles/CMakeOutput.log".

The libraries seem to be there...

13:45 ~/b/e/build ⭠master?
><((°> ls /usr/local/lib/pkgconfig/ | egrep -w 'eet|evas|ecore_file|edje|efreet|elementary'
ecore-evas.pc
ecore-imf-evas.pc
ecore-input-evas.pc
edje-cxx.pc
edje.pc
eet-cxx.pc
eet.pc
efreet-mime.pc
efreet-trash.pc
efreet.pc
elementary-cxx.pc
elementary.pc
evas-cxx.pc
evas-opengl-cocoa.pc
evas-software-buffer.pc
evas.pc
jeanguyomarch commented 6 years ago

I've tried again on a mac, with EFL 1.20.6 from homebrew:

% cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check size of void*
-- Check size of void* - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found eina: /usr/local/Cellar/efl/1.20.6/lib/libeina.dylib
-- Found eet: /usr/local/Cellar/efl/1.20.6/lib/libeet.dylib
-- Found evas: /usr/local/Cellar/efl/1.20.6/lib/libevas.dylib
-- Found ecore: /usr/local/Cellar/efl/1.20.6/lib/libecore.dylib
-- Found ecore_file: /usr/local/Cellar/efl/1.20.6/lib/libecore_file.dylib
-- Found ecore_input: /usr/local/Cellar/efl/1.20.6/lib/libecore_input.dylib
-- Found edje: /usr/local/Cellar/efl/1.20.6/lib/libedje.dylib
-- Found efreet: /usr/local/Cellar/efl/1.20.6/lib/libefreet.dylib
-- Found elementary: /usr/local/Cellar/efl/1.20.6/lib/libelementary.dylib
-- Found MsgPack: /Users/Jean/e/eovim/.deps/_sysroot/lib/libmsgpackc.a
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Jean/e/eovim/build

I'm not quite sure what is wrong on your system :/ Does pkg-config alone returns something meaningful ? What is the ouput of the following command:

pkg-config --cflags eina
jamesgecko commented 6 years ago

I tried building it again on a different MacBook with the same results. I think maybe there's a configuration step I'm missing?

Here's the output

14:25 ~/b/e/build ⭠master
><((°> pkg-config --cflags eina
-I/usr/local/Cellar/efl/1.20.6/include/efl-1 -I/usr/local/Cellar/efl/1.20.6/include/eina-1 -I/usr/local/Cellar/efl/1.20.6/include/eina-1/eina
jeanguyomarch commented 6 years ago

I really fail to see what can cause the problem here :/ Have you tried wiping out the cmake's cache? I think the only way to troubleshoot I have left is cmake's trace. Can you please try:

rm -rf build
mkdir build && cd build
cmake --trace .. &> cmake.log

And then attach the resulting file build/cmake.log to this issue? It may be quite large (~10000 lines), so please don't post it inline.

jamesgecko commented 6 years ago

I've put the logs in some gists.

jeanguyomarch commented 6 years ago

I didn't notice that Eina was actually found. This is so weird that only one of the library can be found. I've restored the osx build on travis, and it passed (https://travis-ci.org/jeanguyomarch/eovim/jobs/329242190). The job did not need extra configuration (just brew update && brew install efl).

Are you using macOS High Sierra? I have never tested EFL on this version of macOS.

Since the next lib missing is eet, can you please give me the output of:

for lib in eet ecore evas; do
  pkg-config --modversion $lib
  pkg-config --cflags $lib
  pkg-config --libs $lib
done
jamesgecko commented 6 years ago

Got it running!

I am using High Sierra on both machines.

(Command modified slightly because I'm also using the Fish shell)

[127] ><((ˣ> for lib in eet ecore evas
                   pkg-config --modversion $lib
                   pkg-config --cflags $lib
                   pkg-config --libs $lib
             end
1.20.6
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openssl', required by 'emile', not found
-L/usr/local/Cellar/efl/1.20.6/lib -leet
1.20.6
-D_REENTRANT -I/usr/local/Cellar/efl/1.20.6/include/efl-1 -I/usr/local/Cellar/efl/1.20.6/include/ecore-1 -I/usr/local/Cellar/glib/2.54.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.54.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.41/include -I/usr/local/Cellar/efl/1.20.6/include/efl-1 -I/usr/local/Cellar/efl/1.20.6/include/eo-1 -I/usr/local/Cellar/efl/1.20.6/include/efl-1 -I/usr/local/Cellar/efl/1.20.6/include/eina-1 -I/usr/local/Cellar/efl/1.20.6/include/eina-1/eina
-L/usr/local/Cellar/efl/1.20.6/lib -lecore -lefl
1.20.6
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openssl', required by 'emile', not found
-L/usr/local/Cellar/efl/1.20.6/lib -levas

The output of brew info openssl gives a bit of useful info at the very end:

For pkg-config to find this software you may need to set:
    PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig

I set my PKG_CONFIG_PATH to /usr/local/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig and the project compiled, but spewed out a bunch of errors and didn't run.

><((°> eovim
dbus[23336]: Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
ERR<23336>:eldbus lib/eldbus/eldbus_core.c:1028 _connection_get() Error connecting to bus of type 2. error name: org.freedesktop.DBus.Error.NoMemory error message: Not enough memory
ERR<23336>:eina_safety lib/eldbus/eldbus_core.c:1091 eldbus_connection_get() safety check failed: conn == NULL
ERR<23336>:eina_safety lib/eldbus/eldbus_object.c:192 eldbus_object_get() safety check failed: conn == NULL
ERR<23336>:ecore_system_upower modules/ecore/system/upower/ecore_system_upower.c:429 _ecore_system_upower_init() could not get object name=org.freedesktop.UPower, path=/org/freedesktop/UPower
ERR<23336>:eina_safety lib/eldbus/eldbus_core.c:1399 eldbus_name_owner_changed_callback_del() safety check failed: conn == NULL

This seems to be related to dbus not running. I had it installed, but the daemon wasn't loaded. After running brew services start dbus, eovim launched successfully.

Thanks!

jeanguyomarch commented 6 years ago

Okay, since it now works for you, I'm closing this :) I've added a setup script that exposes the steps necessary to have a working environment on osx.