Comments (10)
I don't see anything in the CMakeLists.txt
that ever wrote libpthread or libm to Libs.private
. Can you point me to a version that wrote those entries?
Does that change improve it for you:
if(HAVE_LIBCPP)
string(APPEND LIBS_PRIVATE "-lc++")
else()
string(APPEND LIBS_PRIVATE "-lstdc++")
endif()
from libde265.
I am using autoconf.
autoconf uses LIBS internally.
AC_SEARCH_LIBS([pow], [m])
AC_SEARCH_LIBS([sqrt], [m])
AC_SEARCH_LIBS([pthread_create], [pthread])
Libs.private:
used to list @LIBS@
The old value is proper and that's what it should be for static linking.
from libde265.
What holds you back from using cmake?
Those libraries are also missing in the cmake output, but I would prefer to fix the CMakeLists instead of keeping autoconf alive.
from libde265.
What holds you back from using cmake?
Those libraries are also missing in the cmake output, but I would prefer to fix the CMakeLists instead of keeping autoconf alive.
Yes, I also noticed it because of me playing with CMake. I would be fine with focusing on CMake.
Fixing sherlock265 and this issue and I think that's about it. I have a local patch to fix the pkg-config file but doing things upstream would be proper.
from libde265.
What actually requires these pthreads
and libm
in this field? I observed (on Linux) that libde265 is linked without referring to libpthreads or libm.
In libheif
, we also use pthreads and it is also not in the Libs.private
field and not linked explicitly.
What toolchain does need that?
from libde265.
Does this work for you? For me, it doesn't make a difference, because it is not linking explicitly to pthreads.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6066e9ff..fd0e5421 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,10 @@ else()
set(LIBS_PRIVATE "-lstdc++")
endif()
+if (NOT ("${CMAKE_THREAD_LIBS_INIT}" STREQUAL ""))
+ string(APPEND LIBS_PRIVATE " -l${CMAKE_THREAD_LIBS_INIT}")
+endif()
+
option(BUILD_SHARED_LIBS "Build shared library" ON)
if(NOT BUILD_SHARED_LIBS)
add_definitions(-DLIBDE265_STATIC_BUILD)
from libde265.
What actually requires these
pthreads
andlibm
in this field? I observed (on Linux) that libde265 is linked without referring to libpthreads or libm. Inlibheif
, we also use pthreads and it is also not in theLibs.private
field and not linked explicitly. What toolchain does need that?
Relatively recent versions of glibc (https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread#) have merged libpthread and libm into libc and contain stubs for backwards compatibility.
Libs.private:
has a number of uses, but it's important for static linking.
non-Linux POSIX OS's. I am using OpenBSD but this applies for older glibc and other Linux libc implementations.
from libde265.
The generated pkg-config file looks like..
Libs.private: -lc++ -l-lpthread
from libde265.
Also I noticed the Libs:
field..
Libs: -lde265 -L${libdir}
Usually the path comes first and then the library.
from libde265.
Ping.
from libde265.
Related Issues (20)
- Libde265 v1.0.12 was discovered that requested allocation size exceeds maximum supported size of 0x10000000000 HOT 2
- make sure that 'hdrcopy' is not installed HOT 1
- heap-buffer-overflow in derive_spatial_luma_vector_prediction(base_context*, de265_image*, slice_segment_header const*, int, int, int, int, int, int, int, int, int, int, unsigned char*, MotionVector*) HOT 1
- global-buffer-overflow in read_coding_unit HOT 8
- heap-buffer-overflow `libde265/libde265/motion.cc:1719` in `derive_spatial_luma_vector_prediction` HOT 2
- heap-buffer-overflow `libde265/libde265/motion.cc:1443` in `derive_combined_bipredictive_merging_candidates` HOT 3
- heap-buffer-overflow `libde265/libde265/motion.cc:1860` in `derive_spatial_luma_vector_prediction` HOT 3
- Bug in `de265_image::alloc_image(…)` ? HOT 1
- Fix private libraries in libde265.pc for autoconf / automake build
- Switch to cmake and remove autoconf/automake HOT 3
- Heap-buffer-overflow with ASAN in dec265
- `bjoentegaard` freezing if invalid parameters has been supplied
- cmake does not compile neon code for arm architecture HOT 1
- Add sps_multilayer_extension support MV-HEVC Multiview HEVC HOT 1
- Encoder sample crash
- Error compiling in Visual Studio 2022. Missed #include: <cstdio> and <cstring> in sdl.cc?
- Adapting H.265 Video Compression for 16-Bit Integer images
- sherlock265 missing last two frames HOT 1
- Feature Request: GStreamer libde265 encoder with enc265
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libde265.