Obsidian-StudiosInc / ecrire

General purpose graphical Text Editor built on the Enlightenment Foundation Libraries (EFL)
GNU General Public License v3.0
7 stars 1 forks source link

Build issue on efl 1.23.0 #48

Closed NuLogicSystems closed 5 years ago

NuLogicSystems commented 5 years ago

Using cmake + gnu make

$ makepkg -scC
==> Making package: ecrire-git 0.3.3.586.7976d82-1 (Thu 10 Oct 2019 08:38:15 AM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning ecrire git repo...
Cloning into bare repository '/home/jamesk/nulogicos-PKGBUILD/ecrire-git/ecrire'...
remote: Enumerating objects: 3037, done.
remote: Total 3037 (delta 0), reused 0 (delta 0), pack-reused 3037
Receiving objects: 100% (3037/3037), 600.76 KiB | 2.97 MiB/s, done.
Resolving deltas: 100% (2011/2011), done.
==> Validating source files with sha256sums...
    ecrire ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of ecrire git repo...
Cloning into 'ecrire'...
done.
==> Starting pkgver()...
==> Updated version: ecrire-git 0.3.4.590.0d254f8-1
==> Starting build()...
-- The C compiler identification is GNU 9.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 
-- Found eo: /usr/lib/libeo.so  
-- Found eina: /usr/lib/libeina.so  
-- Found eet: /usr/lib/libeet.so  
-- Found evas: /usr/lib/libevas.so  
-- Found ecore: /usr/lib/libecore.so  
-- Found ecore_input: /usr/lib/libecore_input.so  
-- Found efl: /usr/lib/libefl.so  
-- Found edje: /usr/lib/libm.so  
-- Found efreet: /usr/lib/libefreet.so  
-- Found efreet_mime: /usr/lib/libm.so  
-- Found elementary: /usr/lib/libelementary.so  
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jamesk/nulogicos-PKGBUILD/ecrire-git/src/ecrire
Scanning dependencies of target ecrire
[ 14%] Building C object src/bin/CMakeFiles/ecrire.dir/main.c.o
In function ‘_set_path’,
    inlined from ‘_open_file’ at /home/jamesk/nulogicos-PKGBUILD/ecrire-git/src/ecrire/src/bin/main.c:534:7:
/home/jamesk/nulogicos-PKGBUILD/ecrire-git/src/ecrire/src/bin/main.c:211:7: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  211 |       strncpy(f,file,len);
      |       ^~~~~~~~~~~~~~~~~~~
/home/jamesk/nulogicos-PKGBUILD/ecrire-git/src/ecrire/src/bin/main.c: In function ‘_open_file’:
/home/jamesk/nulogicos-PKGBUILD/ecrire-git/src/ecrire/src/bin/main.c:207:9: note: length computed here
  207 |   len = strlen(file)+1;
      |         ^~~~~~~~~~~~
[ 28%] Building C object src/bin/CMakeFiles/ecrire.dir/cfg.c.o
[ 42%] Building C object src/bin/CMakeFiles/ecrire.dir/ui/file_related.c.o
[ 57%] Building C object src/bin/CMakeFiles/ecrire.dir/ui/search_dialog.c.o
[ 71%] Building C object src/bin/CMakeFiles/ecrire.dir/ui/settings_dialog.c.o
[ 85%] Building C object src/bin/CMakeFiles/ecrire.dir/ui/alerts.c.o
[100%] Linking C executable ecrire
/usr/bin/ld: CMakeFiles/ecrire.dir/main.c.o: undefined reference to symbol 'efreet_mime_type_get'
/usr/bin/ld: /usr/lib/libefreet_mime.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/bin/CMakeFiles/ecrire.dir/build.make:175: src/bin/ecrire] Error 1
make[1]: *** [CMakeFiles/Makefile2:153: src/bin/CMakeFiles/ecrire.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
NuLogicSystems commented 5 years ago

Update: refactored my PKGBUILD to use ninja and got the same exact error.

wltjr commented 5 years ago

Hi @NuLogicSystems, this is the same issue as reported in #47, that issue needs a better description.

I spent some time looking into it the other day. It is a pretty strange issue, and casualty resulting from the switch to meson. With 1.22.x, if built with autotools, no issues. If built with meson, you get the issue you ran into and is in #47. Nothing in the CMakeLists.txt files for ecrire changed, and it has libefreet_mime for linking, but fails to add it to the linking command per my comments in https://github.com/Obsidian-StudiosInc/ecrire/issues/47#issuecomment-532314348

I may have to switch to meson to resolve, unless I can figure out what is going wrong with cmake. The files all seem the same, so hard to blame on the switch to meson, but that is when the issue started. There must be something different somewhere...

wltjr commented 5 years ago

Closing as a duplicate of #47