Git Product home page Git Product logo

graphlcd-base's People

Contributors

conikost avatar lucianm avatar m-reimer avatar powarman avatar reelfan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

conikost

graphlcd-base's Issues

Compilation fails with clang-15 and newer

Using Clang-15 or newer for compilation results in a lot of compile errors.

>>> Compiling source in /var/tmp/portage/app-misc/graphlcd-base-2.0.3-r2/work/graphlcd-base-2.0.3 ...
make -j9 -l8
make[1]: Verzeichnis „/var/tmp/portage/app-misc/graphlcd-base-2.0.3-r2/work/graphlcd-base-2.0.3/glcdgraphics“ wird betreten
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  bitmap.c
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  common.c
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  font.c
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  glcd.c
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  image.c
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  imagefile.c
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  pbm.c
clang -x c++ -Qunused-arguments  -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE  extformats.c
extformats.c:26:2: warning: use of a '#elifdef' directive is a C++2b extension [-Wc++2b-extensions]
#elifdef HAVE_IMAGEMAGICK
 ^
extformats.c:41:2: warning: use of a '#elifdef' directive is a C++2b extension [-Wc++2b-extensions]
#elifdef HAVE_IMAGEMAGICK
 ^
2 warnings generated.
clang -march=native -O3 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-O1 -Wl,--sort-common -Wl,-z,now -shared bitmap.o common.o font.o glcd.o image.o imagefile.o pbm.o extformats.o  -Wl,-soname="libglcdgraphics.so.2" -Wl,--no-undefined -o libglcdgraphics.so.2.1.0
ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::compare(char const*) const
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced 14 more times

ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::substr(unsigned long, unsigned long) const
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))

ld.lld: error: undefined symbol: operator delete(void*)
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cColor::ParseColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>))
>>> referenced 56 more times

ld.lld: error: undefined symbol: operator new[](unsigned long)
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::cBitmap(int, int, unsigned int*))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::cBitmap(int, int, unsigned int))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::cBitmap(GLCD::cBitmap const&))
>>> referenced 7 more times

ld.lld: error: undefined symbol: operator delete[](void*)
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::~cBitmap())
>>> referenced by font.c
>>>               font.o:(GLCD::cFont::SaveFNT(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const)
>>> referenced by glcd.c
>>>               glcd.o:(GLCD::cGLCDFile::Load(GLCD::cImage&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
>>> referenced 7 more times

ld.lld: error: undefined symbol: cos
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::DrawSlope(int, int, int, int, unsigned int, int))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::DrawSlope(int, int, int, int, unsigned int, int))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::DrawSlope(int, int, int, int, unsigned int, int))
>>> referenced 1 more times

ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::_M_create(unsigned long&, unsigned long)
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::DrawText(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, GLCD::cFont const*, unsigned int, unsigned int, bool, int))
>>> referenced by common.c
>>>               common.o:(GLCD::trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
>>> referenced by font.c
>>>               font.o:(GLCD::cFont::WrapText(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int*) const)
>>> referenced 8 more times

ld.lld: error: undefined symbol: std::__throw_out_of_range_fmt(char const*, ...)
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::DrawText(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, GLCD::cFont const*, unsigned int, unsigned int, bool, int))
>>> referenced by common.c
>>>               common.o:(GLCD::trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
>>> referenced by font.c
>>>               font.o:(GLCD::cFont::WrapText(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int*) const)
>>> referenced 3 more times

ld.lld: error: undefined symbol: operator new(unsigned long)
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::DrawCharacter(int, int, int, unsigned int, GLCD::cFont const*, unsigned int, unsigned int, int))
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::SubBitmap(int, int, int, int) const)
>>> referenced by bitmap.c
>>>               bitmap.o:(GLCD::cBitmap::ConvertFrom1BPP(unsigned char const*, int, int, unsigned int, unsigned int))
>>> referenced 16 more times

ld.lld: error: undefined symbol: __gxx_personality_v0
>>> referenced by bitmap.c
>>>               bitmap.o:(DW.ref.__gxx_personality_v0)

ld.lld: error: undefined symbol: std::__throw_length_error(char const*)
>>> referenced by font.c
>>>               font.o:(void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&))
>>> referenced by glcd.c
>>>               glcd.o:(GLCD::cImage::AddBitmap(GLCD::cBitmap*))
>>> referenced by image.c
>>>               image.o:(GLCD::cImage::Scale(unsigned short, unsigned short, bool))
>>> referenced 2 more times

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info
>>> referenced by glcd.c
>>>               glcd.o:(typeinfo for GLCD::cGLCDFile)
>>> referenced by pbm.c
>>>               pbm.o:(typeinfo for GLCD::cPBMFile)
>>> referenced by extformats.c
>>>               extformats.o:(typeinfo for GLCD::cExtFormatFile)
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::rfind(char, unsigned long) const
>>> referenced by image.c
>>>               image.o:(GLCD::cImage::GetFilenameExtension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
>>> referenced by pbm.c
>>>               pbm.o:(GLCD::cPBMFile::Save(GLCD::cImage&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__class_type_info
>>> referenced by imagefile.c
>>>               imagefile.o:(typeinfo for GLCD::cImageFile)
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:72: libglcdgraphics.so.2.1.0] Fehler 1
make[1]: Verzeichnis „/var/tmp/portage/app-misc/graphlcd-base-2.0.3-r2/work/graphlcd-base-2.0.3/glcdgraphics“ wird verlassen
make: *** [Makefile:18: all] Fehler 2

vdr is crashing on shutdown caused by vdr-plugin-graphlcd caused by graphlcd-base

backtrace

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49	  return ret;
[Current thread is 1 (Thread 0x7f9944e807c0 (LWP 29208))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007f99453478a4 in __GI_abort () at abort.c:79
#2  0x00007f9945347789 in __assert_fail_base
    (fmt=0x7f992c01e583 "%s%s%s:%u: %s%sZusicherung \302\273%s\302\253 nicht erf\303\274llt.\n%n", assertion=0x7f99459f6096 "fcCacheChains[i] == NULL", file=0x7f99459f608c "fccache.c", line=807, function=<optimized out>) at assert.c:92
#3  0x00007f9945357026 in __GI___assert_fail
    (assertion=assertion@entry=0x7f99459f6096 "fcCacheChains[i] == NULL", file=file@entry=0x7f99459f608c "fccache.c", line=line@entry=807, function=function@entry=0x7f99459f6ef0 <__PRETTY_FUNCTION__.0> "FcCacheFini") at assert.c:101
#4  0x00007f99459cfabb in FcCacheFini () at fccache.c:807
#5  IA__FcFini () at fcinit.c:205
#6  0x00007f992f99d7b5 in GLCD::cSkinFont::~cSkinFont() (this=0x7f990c09b010, __in_chrg=<optimized out>) at font.c:31
#7  0x00007f992f99d898 in GLCD::cSkinFonts::~cSkinFonts() (this=0x7f990c0094a0, __in_chrg=<optimized out>) at font.c:223
#8  0x00007f992f9b5e3b in GLCD::cSkin::~cSkin() (this=0x7f990c009430, __in_chrg=<optimized out>) at skin.c:28
#9  0x00007f992fa13a87 in cGraphLCDDisplay::~cGraphLCDDisplay() (this=0x56260df70390, this=<optimized out>) at display.c:65
#10 0x00007f992fa1540f in cGraphLCDDisplay::~cGraphLCDDisplay() (this=0x56260df70390, this=<optimized out>) at display.c:61
#11 cPluginGraphLCD::DisconnectDisplay(unsigned int) (this=this@entry=0x56260e028e60, index=index@entry=0) at plugin.c:320
#12 0x00007f992fa19d08 in cPluginGraphLCD::~cPluginGraphLCD() (this=0x56260e028e60, this=<optimized out>) at plugin.c:124
#13 0x00007f992fa19e75 in cPluginGraphLCD::~cPluginGraphLCD() (this=0x56260e028e60, this=<optimized out>) at plugin.c:121
#14 VDRPluginDestroyer(cPluginGraphLCD*) (p=0x56260e028e60) at plugin.c:692
#15 0x000056260c7cb5b5 in cDll::~cDll() (this=0x56260df658e0, this=<optimized out>) at plugin.c:191
#16 cDll::~cDll() (this=0x56260df658e0, this=<optimized out>) at plugin.c:198
#17 0x000056260c7d62b2 in cListBase::Del(cListObject*, bool) (DeleteObject=true, Object=0x56260df658e0, this=<optimized out>) at tools.c:2209
#18 cPluginManager::Shutdown(bool) (this=0x7fff5eff0c30, Log=true) at plugin.c:524
#19 0x000056260c71f4d7 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at vdr.c:1627
(gdb) 

related code found in file: glcdskin/font.c

#ifdef HAVE_FONTCONFIG
    cSkinFont::FcInitCount --;
    if (cSkinFont::FcInitCount <= 0) {
      FcFini();   <--!!
    }
#endif
}

There are several hits found by Dr. Google related to that problem. Any hint how to fix? I can run test-builds if a patch is supplied.

Support for ImageMagick-7

Hi!
Is there any possibilty to get support for ImageMagick-7? It looks like, that its currently not supported.

x86_64-pc-linux-gnu-g++  -march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden -MMD -MP -MMD -MP -fPIC -c -D_GNU_SOURCE -DHAVE_IMAGEMAGICK -I/usr/include/ImageMagick-7 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=32  extformats.c
font.c: In member function ‘bool GLCD::cFont::LoadFNT(const std::string&, const std::string&)’:
font.c:148:10: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  148 |     fread(buffer, kFontHeaderSize, 1, fontFile);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
font.c:169:14: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  169 |         fread(chdr, kCharHeaderSize, 1, fontFile);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
font.c:172:14: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  172 |         fread(buffer, fontHeight * ((charWidth + 7) / 8), 1, fontFile);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
extformats.c: In member function ‘virtual bool GLCD::cExtFormatFile::LoadScaled(GLCD::cImage&, const std::string&, uint16_t&, uint16_t&)’:
extformats.c:131:30: error: ‘class Magick::Image’ has no member named ‘matte’
  131 |         bool isMatte = (*it).matte();
      |                              ^~~~~
extformats.c:133:23: error: ‘PixelPacket’ in namespace ‘Magick’ does not name a type; did you mean ‘PixelMask’?
  133 |         const Magick::PixelPacket *pix = (*it).getConstPixels(0, 0, (int)width, (int)height);
      |                       ^~~~~~~~~~~
      |                       PixelMask
extformats.c:137:65: error: ‘pix’ was not declared in this scope; did you mean ‘ix’?
  137 |             if ( isMatte && Magick::Color::scaleQuantumToDouble(pix->opacity) * 255 == 255 ) {
      |                                                                 ^~~
      |                                                                 ix
extformats.c:155:15: error: ‘pix’ was not declared in this scope; did you mean ‘ix’?
  155 |             ++pix;
      |               ^~~
      |               ix

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.