Comments (10)
from ddcutil.
Hi,
The auto files are regenerated each time a build is run. Even re-extracting the files so it's a 100% clean build from scratch. Sometimes the // happens because the variable is defined with ending in a slash and the path is set to begin with a slash, so when the two are concatenated together, the double slash happens. The variable for the path to install dir (/var/tmp/portage/app-misc/ddcutil-0.7.0/image/) ends in the slash, and the way the install dir in the makefiles might begin with / for /usr/lib.
However, I think I found the issue:
In the compile output there is this:
(install-exec-hook) Executing...
pythondir = /usr/lib64/python3.5/site-packages
pyexecdir = /usr/lib64/python3.5/site-packages
/var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64
ls -ld /var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64
ls: cannot access '/var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64': No such file or directory
I looked for that in the make files. In "src/Makefile.am" there is this at the very bottom:
install-exec-hook:
@echo "(install-exec-hook) Executing..."
@echo " pythondir = $(pythondir)"
@echo " pyexecdir = $(pyexecdir)"
@echo $(DESTDIR)$(libdir)
ls -ld $(DESTDIR)$(libdir)
ls -l $(DESTDIR)$(libdir)/*la
sed -i "/dependency_libs/ s/'.*'/''/" $(DESTDIR)$(libdir)/libddcutil.la
When there are no shared libs, I'm guess there are no libs installed to /usr/lib{32,64}, so this section should not be executed at all. It is trying to access a directory that doesn't exist, and then it will try to list files that don't exists and then it will try to sed a file that doesn't exist.
Hope this helps.
from ddcutil.
from ddcutil.
Sanford,
The test needs to detect the directory because it's also trying to use ls command in a directory that doesn't exist, which is the error:
ls: cannot access '/var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64': No such file or directory
because that directory doesn't exist at all when using --disable-lib
I tried this patch:
diff -purN a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am 2017-01-02 21:42:04.000000000 +0000
+++ b/src/Makefile.am 2017-01-20 12:28:35.192559062 +0000
@@ -366,10 +366,12 @@ install-exec-hook:
@echo "(install-exec-hook) Executing..."
@echo " pythondir = $(pythondir)"
@echo " pyexecdir = $(pyexecdir)"
- @echo $(DESTDIR)$(libdir)
- ls -ld $(DESTDIR)$(libdir)
- ls -l $(DESTDIR)$(libdir)/*la
- sed -i "/dependency_libs/ s/'.*'/''/" $(DESTDIR)$(libdir)/libddcutil.la
+ if [[ -d $(DESTDIR)$(libdir) ]]; then \
+ @echo $(DESTDIR)$(libdir) \
+ ls -ld $(DESTDIR)$(libdir) \
+ ls -l $(DESTDIR)$(libdir)/*la \
+ sed -i "/dependency_libs/ s/'.*'/''/" $(DESTDIR)$(libdir)/libddcutil.la \
+ fi
# objdump -p $(DESTDIR)$(libdir)/libddcutil.so | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
But I get: /bin/sh: -c: line 6: syntax error: unexpected end of file
I tried in various forms of this after reading help on how to do directory checking in a makefile.
Cheers.
from ddcutil.
I did a bit more testing. I was able to compile ddcutil with lib disabled. However, there are some things that are installed that shouldn't be.
ddcutil.pc file is installed pointing to include and libs, but the libs are not installed:
ddcutil.pc:
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include
Name: ddcutil
Description: Control display settings
URL: http://www.ddcutil.com
Version: 0.7.0
# Requires: ??
# Libs and Cflags not needed since using default locations
Libs: -L${libdir}
Cflags: -I${includedir}
Also, the header files are installed: /usr/include/{ddcutil_c_api.h,ddcutil_types.h} which mention that it's for the C API, however, the C API needed the shared libs that are not installed. Thus, the header files should not be installed as well.
There must be a better way of doing the patch as when I run compile, this is outputted:
(install-exec-hook) Executing...
pythondir = /usr/lib64/python3.5/site-packages
pyexecdir = /usr/lib64/python3.5/site-packages
if [[ -d /var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64 ]]; then \
@echo /var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64; \
ls -ld /var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64; \
ls -l /var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64/*la; \
sed -i "/dependency_libs/ s/'.*'/''/" /var/tmp/portage/app-misc/ddcutil-0.7.0/image//usr/lib64/libddcutil.la; \
fi
So it doesn't make a very clean build log.
This is the patch I used:
diff -purN a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am 2017-01-02 21:42:04.000000000 +0000
+++ b/src/Makefile.am 2017-01-20 12:28:35.192559062 +0000
@@ -366,10 +366,12 @@ install-exec-hook:
@echo "(install-exec-hook) Executing..."
@echo " pythondir = $(pythondir)"
@echo " pyexecdir = $(pyexecdir)"
- @echo $(DESTDIR)$(libdir)
- ls -ld $(DESTDIR)$(libdir)
- ls -l $(DESTDIR)$(libdir)/*la
- sed -i "/dependency_libs/ s/'.*'/''/" $(DESTDIR)$(libdir)/libddcutil.la
+ if [[ -d $(DESTDIR)$(libdir) ]]; then \
+ @echo $(DESTDIR)$(libdir); \
+ ls -ld $(DESTDIR)$(libdir); \
+ ls -l $(DESTDIR)$(libdir)/*la; \
+ sed -i "/dependency_libs/ s/'.*'/''/" $(DESTDIR)$(libdir)/libddcutil.la; \
+ fi
# objdump -p $(DESTDIR)$(libdir)/libddcutil.so | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
Hope this helps.
from ddcutil.
from ddcutil.
Ah. The python trap.
Gentoo is nice because there are variables that store everything for building. It doesn't matter what the system has, as in, /usr/bin/python pointing to python35 or python27. When we build something, we give the configure script all the paths. For example, a user can want the program for python 2.7 even though 3.5 is default, so the path to 2.7 and the site-directory, includes... so on are passed through to the configure script and it installs everything for the right version of python and the right locations. :) (https://devmanual.gentoo.org/eclass-reference/python-utils-r1.eclass/index.html If you want to see how we sort it all).
All you need are variables that hold python version, site directories, library, includes, so on, set sane defaults and if they are different, then they can be overridden by package maintainers. That will save you a load of headaches as you only need to know your system, and set the defaults to that.
Cheers.
from ddcutil.
from ddcutil.
Thanks for your hard work on this. :)
from ddcutil.
0.7.1 compiles perfectly with or without shared libs enabled. Thanks for your hard work on fixing this.
Jon
from ddcutil.
Related Issues (20)
- add-feature to configue sync monitor brightness HOT 2
- Feature: detect when VCP value is unsettable HOT 2
- Second display not recognized in MST/daisy-chain setup using Dell U2723QE HOT 7
- ddcutil 2.0.0
- Why is the 0x37 address missing from my computer? HOT 8
- Error messages/warnings are printed to stdout HOT 7
- Samsung LS32A70 port mapping errata with workarounds for 'Notes on specific monitors' HOT 1
- Simplest code triggers assertion failure HOT 9
- Experimental option --skip-ddc-checks
- changing monitor color mode HOT 1
- dccutil 2.0 regression, sporadic errors (Display not found, unsupported feature code) HOT 27
- ddcutil 2.0.0, strange warnings (Feature 0xXX should not exist) HOT 5
- Koorui 27E3Q: detection works, setting brightness also works but changes aren't physically reflected HOT 2
- ddca_get_any_vcp_value_using_implicit_type() incorrect order of arguments passed to ddca_get_any_vcp_value_using_explicit_type() HOT 5
- Invalid display with eDP laptop when running `ddcutil detect` HOT 1
- Invalid utf-8 in EDID decode Extra descriptor HOT 5
- ubsan int overflow HOT 2
- stack overflow in query_proc_modules_for_video leading to segfault HOT 5
- With "--enable-usb=no", compile error: ‘ignored_vid_pid’ undeclared HOT 1
- The brightness is always set to 0 when executing `setvcp` on Rpi5 Bookworm HOT 1
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 ddcutil.