rockowitz / ddcui

Graphical user interface for ddcutil - control monitor settings
http://www.ddcutil.com
GNU General Public License v2.0
147 stars 2 forks source link

Error when running make #23

Open archisman-panigrahi opened 3 years ago

archisman-panigrahi commented 3 years ago

I generated the makefile with qmake in Linux Mint 20 (based on Ubuntu 20.04), and I have installed ddcutil with sudo apt install ddcutil.

When I try to compile ddcui with make, I get this error.

$ make
g++ -c -pipe -Wno-misleading-indentation -Wno-unused-parameter -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_HELP_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Isrc -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtHelp -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o ddca_utils.o src/base/ddca_utils.cpp
src/base/ddca_utils.cpp:12:10: fatal error: ddcutil_types.h: No such file or directory
   12 | #include <ddcutil_types.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1061: ddca_utils.o] Error 1

How to fix this?

rockowitz commented 3 years ago

When you build ddcutil from source, "sudo make install" installs the command line version of ddcutil, the shared library, and the development files.  For distribution, these pieces are split into packages ddcutil, ddcutilN (where N is the shared library version number), and the development files.  It looks like you've installed only the first package.

The current version of ddcui requires ddcutil 0.9.9.  So unless the Mint packages are at that level, you'll need to build ddcutil from source.  Alternatively, you can get the latest prebuilt Ubuntu packages for ddcutil (and ddcui as well) from the launchpad ppa https://launchpad.net/~rockowitz/+archive/ubuntu/ddcutil

Note that if you build and install ddcutil from source, by default "sudo make install" installs the include files and shared library under /usr/local/, .e.g. /usr/local/include.  Depending on your distribution, these files may or may not be in the system include and shared library paths, so some fixup may be required for ddcui to find them.  For further details, see the page Building ddcui http://www.ddcutil.com/building_ddcui on the ddcutil web site.

On 10/24/20 8:23 AM, Archisman Panigrahi wrote:

I generated the makefile with |qmake| in Linux Mint 20, and I have installed |ddcutil| with |sudo apt install ddcutil|.

When I try to compile with |make|, I get this error.

|$ make g++ -c -pipe -Wno-misleading-indentation -Wno-unused-parameter -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_HELP_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Isrc -isystem /usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtHelp -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o ddca_utils.o src/base/ddca_utils.cpp src/base/ddca_utils.cpp:12:10: fatal error: ddcutil_types.h: No such file or directory 12 | #include

| ^~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:1061: ddca_utils.o] Error 1 | How to fix this? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub , or unsubscribe .
archisman-panigrahi commented 3 years ago

Thank you for your quick reply. Mint package had version 0.9.8-2. I installed latest version of libddcutil-dev and ddcutil from the PPA, and the compiled version of ddcui in the PPA works.

However, when I try to compile the source I get another error. Output: https://pastebin.com/SdEqbdyi

Can you please do the following

  1. Enable PPA packages for Ubuntu 20.10 (just copy the packages from 20.04)
  2. Backport latest version of ddcui and ddcutil to Ubuntu 18.04 and 16.04 unless there are any missing runtime dependencies (again, copy the packages without rebuilding)
  3. Mention the PPA in the README of ddcui as well as the website. The PPA is somewhat hard to find.
rockowitz commented 3 years ago

On 10/25/20 2:42 AM, Archisman Panigrahi wrote:

Thank you for your quick reply. Mint package had version |0.9.8-2|. I installed latest version of |libddcutil-dev| and |ddcutil| from the PPA, and the compiled version of |ddcui| in the PPA works.

Comments on ddcui are particularly welcome.  It's far from ready for prime time.

However, when I try to compile I get another issue. Output: https://pastebin.com/SdEqbdyi

Looking at the output, the link command does not include "-l ddcutil" and if necessary "-L/usr/local/lib".  Look at the LIBS assignment at around line 43 in the generated Makefile.  It looks like pkgconfig is not returning the correct information.  (From the command line, "pkg-config --libs", "pkg-config --cflags").   Where in the file system is ddcutil.pc?  If /usr/local/lib/pkgconfig, is that directory in the pkgconfig search path?

Can you please do the following

  1. Enable PPA packages for Ubuntu 20.10 (just copy the packages from 20.04)

Done.

  1. Backport latest version of |ddcui| and |ddcutil| to Ubuntu 18.04 and 16.04 unless there are any missing runtime dependencies (again, copy the packages without rebuilding)

Fails.  From the emails: "same version already has published binaries in the destination archive".  Since I don't see the "published binaries" it's not clear how get around this.

For future ddcutil/ddcui releases, I think the solution will be to initially build for 16.04 (or later if necessary), then copy to later Ubuntu releases.

  1. Mention the PPA in the README of |ddcui| as well as the website. The PPA is somewhat hard to find.

Good idea.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rockowitz/ddcui/issues/23#issuecomment-716102289, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMGY3XBDYTJ7XCV6V6DXN3SMPCDTANCNFSM4S5RUWDQ.

archisman-panigrahi commented 3 years ago

Looking at the output, the link command does not include "-l ddcutil" and if necessary "-L/usr/local/lib". Look at the LIBS assignment at around line 43 in the generated Makefile. It looks like pkgconfig is not returning the correct information. (From the command line, "pkg-config --libs", "pkg-config --cflags"). Where in the file system is ddcutil.pc? If /usr/local/lib/pkgconfig, is that directory in the pkgconfig search path?

I will look into it.

Fails. From the emails: "same version already has published binaries in the destination archive". Since I don't see the "published binaries" it's not clear how get around this. For future ddcutil/ddcui releases, I think the solution will be to initially build for 16.04 (or later if necessary), then copy to later Ubuntu releases.

As far as I can remember, selecting this option while copying packages solves this issue. No need to publish for 16.04 first. Screenshot from 2020-10-26 16-00-13

rockowitz commented 3 years ago

I tried copying rather than rebuilding for older Ubuntu releases, then thought better of it.  While I know of no reason the current ddcutil should not work on earlier Ubuntu releases, to be certain packages should be rebuilt, not just copied.  Plus, ddcui is a newer program, and its dependencies (Qt) are more complex.  I'll revisit the build process for the next release.  Thanks for pointing out the problem.

On 10/26/20 6:35 AM, Archisman Panigrahi wrote:

Looking at the output, the link command does not include "-l
ddcutil" and if necessary "-L/usr/local/lib". Look at the LIBS
assignment at around line 43 in the generated Makefile. It looks
like pkgconfig is not returning the correct information. (From the
command line, "pkg-config --libs", "pkg-config --cflags"). Where
in the file system is ddcutil.pc? If /usr/local/lib/pkgconfig, is
that directory in the pkgconfig search path?

I will look into it.

Fails. From the emails: "same version already has published
binaries in the destination archive". Since I don't see the
"published binaries" it's not clear how get around this. For
future ddcutil/ddcui releases, I think the solution will be to
initially build for 16.04 (or later if necessary), then copy to
later Ubuntu releases.

As far as I can remember, selecting this option while copying packages solves this issue. Screenshot from 2020-10-26 16-00-13 https://user-images.githubusercontent.com/3063132/97161990-9366df00-17a4-11eb-9bae-d7decac536f6.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rockowitz/ddcui/issues/23#issuecomment-716460171, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMGY3WEMMVQZZFJLM32EDLSMVGHXANCNFSM4S5RUWDQ.