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

[Archlinux] libgflags not found on configure #44

Open
xiamaz opened this issue Oct 19, 2016 · 9 comments
Open

[Archlinux] libgflags not found on configure #44

xiamaz opened this issue Oct 19, 2016 · 9 comments

Comments

@xiamaz
Copy link

xiamaz commented Oct 19, 2016

When following the compile instructions on the readme, this error occurs on executing
./configure

checking for LIBGFLAGS... no
configure: error: Package requirements (libgflags) were not met:

No package 'libgflags' found

The gflags package for Archlinux includes all development libraries including libgflags.so, but the autoconf fails, most probably because the package is called "gflags", not "libgflags".

How could this be fixed? Setting environment variables helps, but seems to be a rather bad compromise for me.

@erlkonig
Copy link

erlkonig commented Oct 28, 2016

I noticed that gflags is easy to install on linux but (on Ubuntu 16.04) lacks the /usr/lib/x86_64-linux-gnu/pkgconfig/libgflags.pc it needs. While I just tossed this into that file, the underlying problem is that pkg-config isn't bright enough to find a library that's on the system without the extra metadata. I think the gflags guys have an issue open on this already, but mostly I'd call this a problem with pkg-config.

prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib/x86_64-linux-gnu
includedir=/usr/include/x86_64-linux-gnu

Name: libgflags
Description: A commandline flags library that allows for distributed flags
Version: 1.3
Requires: 
Conflicts:
Libs: -L${libdir}
Libs.private: -lpthread
# Cflags: -I${includedir}

All that aside, even with libgflags installed and findable, my build still broke with this on the last step for hiptext itself:

g++ -std=gnu++11  -g -O2   -o hiptext src/hiptext-hiptext.o libhiptext.a -ljpeg -lavcodec-ffmpeg -lavformat-ffmpeg -lavutil-ffmpeg -lfreetype  -L/pod/local/lib -lglog -lpng12 -lswscale-ffmpeg -ljpeg  -lglog
/usr/bin/ld: src/hiptext-hiptext.o: undefined reference to symbol '_ZN6google16SetVersionStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
//usr/lib/x86_64-linux-gnu/libgflags.so.2: error adding symbols: DSO missing from command line

I had to add the -lgflags option manually. Heh.

@TCatshoek
Copy link

I was able to get it to compile by doing:

ln -s /usr/lib/pkgconfig/gflags.pc /usr/lib/pkgconfig/libgflags.pc

In movie.cc, I also had to prefix all occurences of PIX_FMT_*with AV_ (found here) and replace calls to avcodec_alloc_frame() with av_frame_alloc() (found here)

@voltuer
Copy link

voltuer commented Apr 12, 2018

Thanks so much guys, using @TCatshoek replacements together with renaming every occurence of "libgflags" (with ") to "gflags" in configure file, made me able to compile this shit on Ubuntu 17. Let's hope they change this files in the source.

@std4453
Copy link

std4453 commented Mar 14, 2019

Still couldn't get it working under debian stretch with libgflags-dev version 2.1.2-4, which claims to have already fixed the bug.

Replacing all "libgflags" with "gflags" won't work either, says "No package 'gflags' found".

I wonder whether I'm missing something.

@ert485
Copy link

ert485 commented Jan 5, 2020

I'm on macOS Catalina, and was able to get around this with steps referenced by @sebolio as well as brew install gflags and brew install glog, but also got stuck on issue #49

@ColonelBuendia
Copy link

On Ubuntu 18 it was ln -s /usr/lib/x86_64-linux-gnu/pkgconfig/gflags.pc /usr/lib/x86_64-linux-gnu/pkgconfig/libgflags.pc
after finding where your gflags.pc was with locate
sudo apt install libgoogle-glog-dev
sudo apt install libswscale-dev
sed -i 's/PIX_FMT_RBG24/AV_PIX_FMT_RBG24/g' src/movie.cc
sed -i 's/avcodec_alloc_frame/av_frame_alloc/g' src/movie.cc

A big thank you to @TCatshoek for figuring it out and providing the steps.

@cawa0505
Copy link

cawa0505 commented Jan 8, 2021

sed -i 's/PIX_FMT_RBG24/AV_PIX_FMT_RBG24/g' src/movie.cc

sed -i 's/PIX_FMT_RGB24/AV_PIX_FMT_RGB24/g' src/movie.cc

@navid-zamani
Copy link

Still broken as of now. The installation instructions should work on standard base distributions like Debian, Fedora, Suse, Arch, Gentoo, Slackware, or whatever is considered base nowadays. (If it runs in Ubuntu and Gentoo, I personally am fine, but this is not about me.)

@cyborgdennett
Copy link

Also fails on ubuntu 24, it cannot find the libgflag, while i just did install it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants