sagiadinos / garlic-player

Digital Signage Player based on SMIL
https://garlic-player.com
GNU Affero General Public License v3.0
82 stars 14 forks source link

linux.pro compilation fails while trying to link to -lzlib #3

Closed skinkie closed 4 years ago

skinkie commented 4 years ago

Describe the bug Compilation fails while trying to link to -lzlib

To Reproduce Steps to reproduce the behavior:

  1. cd src
  2. qmake linux.pro
  3. make

Expected behavior Linked binary.

Desktop (please complete the following information):

Additional context

/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lzlib
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:600: ../lib/libgarlic.so.1.0.0] Error 1
make[1]: Leaving directory '/mnt/storage/home/skinkie/Sources/garlic-player/src/garlic-lib'

The complete.pro compilation works without issues.

sagiadinos commented 4 years ago

Hello skinkie, linux.pro is fixed. Now it should include the build of zlib and quazip.

My suggestion is to use a shadow-build directory, for not polluting the src-dirs. like: mkdir shadow-build cd shadow-build qmake path_to/linux.pro make -j8

-j8 will use 8 cores. garlic-player binary will be in shadow-build/bin

P.S.: thx for correcting typos in readme

skinkie commented 4 years ago

@sagiadinos I would expect that zlib is available on virtually any Linux system. So I do wonder why linking would fail. I'll send you an e-mail about a different topic.

sagiadinos commented 4 years ago

@skinkie Yes under linux zlib is available easily. Unfortunately Windows makes it more complicated. Qt uses zlib 1.2.11 undocumented and only internal in QtCore (qt5/qtbase/src/3rdparty/zlib) . So I decided to include the zlib sources into garlic to get sure everyone has it.