Author Topic: gtk-kde4 cmake error  (Read 4009 times)

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
gtk-kde4 cmake error
« on: May 28, 2010, 02:32:01 PM »
I'm trying to create a rpm of gtk-kde4. This is my first attempt at creating a package. I've included the spec file and cli output as attachments. Here are the steps I've taken:

source: kde-apps, direct download
version: 0.9.4
distro: minime 2010 fully updated
installed: pkgutils, pkgutils-kde4, task-packaging-kde4, gtk-kde4 build requirements, gcc-c++
commands executed: mkrepo -a -d PCLinuxOS -v PCLinuxOS -s pclos -p Chomp

I managed to compile this fine on minime and it worked.  After a fresh re-install I followed the steps above and ended up with the cmake error you can see in the cli output file attachment.

The problem seems to be with

Code: [Select]
CMake Error at cmake_install.cmake:36 (FILE):
file INSTALL cannot find file
"/home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/lib/kcm_gk4.so" to install.

kcm_gk4 is located at /home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/build/lib/kcm_gk4.so

My spec file is based off of the qtcurve-gtk2 spec file since the install instructions are similar and both apps provide a similar service. I've read the instructions at http://tinymelinux.com/doku.php/build-rpms:intro and have tried playing with the spec file in various ways with no luck.

Can I get the spec file to look in /home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/build/lib/kcm_gk4.so instead of /home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/lib/kcm_gk4.so? What am I doing wrong?
« Last Edit: December 26, 2010, 03:16:22 PM by travisn000 »

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #1 on: May 28, 2010, 04:06:03 PM »
CMake Error at cmake_install.cmake:36 (FILE):
  file INSTALL cannot find file
  "/home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/lib/kcm_gk4.so" to install.

It looks to me like the sources file cmake_install.cmake has errored out at line 36 where it is looking for the file "/home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/lib/kcm_gk4.so" and cannot find it where it expects it to be.

Also there is no %files section in your spec file so even if it builds it will fail to create an rpm.
« Last Edit: May 28, 2010, 04:07:39 PM by Joble »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12525
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #2 on: May 28, 2010, 09:58:28 PM »
CMake Error at cmake_install.cmake:36 (FILE):
  file INSTALL cannot find file
  "/home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/lib/kcm_gk4.so" to install.

It looks to me like the sources file cmake_install.cmake has errored out at line 36 where it is looking for the file "/home/chomp/src/rpm/BUILD/gtk-kde4-0.9.4/lib/kcm_gk4.so" and cannot find it where it expects it to be.

Also there is no %files section in your spec file so even if it builds it will fail to create an rpm.

This package required some work on the cmake file as well as a patch from slackware. I'm going to put it in the repo to replace gtk-qt and see if it works any better without hanging firefox in memory that some people are having issues with.

Tex


Thanks to everyone who donates. You keep the servers running.

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #3 on: May 28, 2010, 10:01:55 PM »
uh.... I got nuttin.  Wish I had something but..... I gut nuttin.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12525
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #4 on: May 28, 2010, 10:08:20 PM »
Fixed cmake file

cmake_minimum_required(VERSION 2.6)
PROJECT (kcm_gk4)
FIND_PACKAGE(KDE4 REQUIRED)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} )
include_directories(${KDE4_INCLUDES} ${QT_INCLUDES})
LINK_DIRECTORIES(${QT_LIBRARY_DIR})

ADD_SUBDIRECTORY(kcm)

INSTALL(FILES build/lib/kcm_gk4.so DESTINATION ${KDE4_LIB_DIR}/kde4)
INSTALL(FILES kcm/kcm_gk4.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} )
INSTALL(FILES kcm/gk4icon.png DESTINATION ${KDE4_ICON_INSTALL_DIR})
INSTALL(DIRECTORY qt4 DESTINATION /usr/share/themes)
INSTALL(DIRECTORY gk4ico DESTINATION /usr/share/icons)

PROJECT (gtk-kde4)
FIND_PACKAGE(KDE4 REQUIRED)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} )
include_directories(${KDE4_INCLUDES} ${QT_INCLUDES})
LINK_DIRECTORIES(${QT_LIBRARY_DIR})

ADD_SUBDIRECTORY(daemon)

INSTALL(FILES build/daemon/gtk-kde4 DESTINATION ${KDE4_BIN_INSTALL_DIR} PERMISSIONS WORLD_EXECUTE)
INSTALL(FILES .gtkrc-2.0-kde4 DESTINATION $ENV{HOME} PERMISSIONS WORLD_READ)

string(LENGTH conf len)
IF (NOT len)
  INSTALL(FILES daemon/gtk-kde4.desktop DESTINATION $ENV{XDG_CONFIG_DIRS}/autostart PERMISSIONS WORLD_EXECUTE)
ELSE()
  INSTALL(FILES daemon/gtk-kde4.desktop DESTINATION /etc/xdg/autostart PERMISSIONS WORLD_EXECUTE WORLD_READ)
ENDIF()

INSTALL(SCRIPT CMakeSymlink)


You also need this patch from slackware.

 http://dev.slackverse.org/patches/kde4-gtk-0.9.4_fix_bad_quotes.patch

and patch it with
%patch1 -p0

# Files area
%files
%defattr(-,root,root)
/etc/xdg/autostart/gtk-kde4.desktop
/root/.gtkrc-2.0-kde4
%_bindir/gtk-kde4
%_libdir/kde4/kcm_gk4.so
%_datadir/icons/gk4ico/index.theme
%_datadir/icons/gk4icon.png
%_datadir/kde4/services/kcm_gk4.desktop
%_datadir/themes/qt4/gtk-2.0
%_datadir/themes/qt4/index.theme
%_datadir/themes/qt4/metacity-1/*.png
%_datadir/themes/qt4/metacity-1/metacity-theme-1.xml


Thanks to everyone who donates. You keep the servers running.

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #5 on: May 28, 2010, 10:50:39 PM »
Just like months later I still don't always understand what O-P posted, I expect that months from now I may still be trying to figure this one out.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12525
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #6 on: May 28, 2010, 11:24:50 PM »
Just like months later I still don't always understand what O-P posted, I expect that months from now I may still be trying to figure this one out.


Joble says:


Thanks to everyone who donates. You keep the servers running.

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #7 on: May 28, 2010, 11:54:28 PM »
hehe. funny man.  If not for the junk left in there, I'm not sure I would even have a brain.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #8 on: May 29, 2010, 01:23:13 AM »
Wow, thanks a lot Texstar, I never would have figured that out on my own.  I didn't want to post my question because I really wanted to figure it out on my own, but now I'm glad I did. Will have a look at this fully tomorrow.


Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12525
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #9 on: May 29, 2010, 02:56:37 AM »
Wow, thanks a lot Texstar, I never would have figured that out on my own.  I didn't want to post my question because I really wanted to figure it out on my own, but now I'm glad I did. Will have a look at this fully tomorrow.



Most KDE 4 packages don't have this problem. This one had a bad cmake file.

Thanks to everyone who donates. You keep the servers running.

Offline rick71

  • Sr. Member
  • ****
  • Posts: 250
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #10 on: May 29, 2010, 10:44:55 AM »
This package required some work on the cmake file as well as a patch from slackware. I'm going to put it in the repo to replace gtk-qt and see if it works any better without hanging firefox in memory that some people are having issues with.
Tex

Thanks. That's saves me from having to post a software request :-)
Rick

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #11 on: May 29, 2010, 01:59:20 PM »
Wow, thanks a lot Texstar, I never would have figured that out on my own.  I didn't want to post my question because I really wanted to figure it out on my own, but now I'm glad I did. Will have a look at this fully tomorrow.



Most KDE 4 packages don't have this problem. This one had a bad cmake file.

Oh yeah, no problem, it's just a bad cmake file.  Duh.  (He makes it sound so easy.)  Don't think I would have figured all that out either.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #12 on: December 26, 2010, 02:14:57 PM »
I was having some difficulty after recent KDE4 updates with not being able to see right click menu's in gtk applications when using gtk-oxygen-molecule so I switched to gtk-kde4 for abit, but didn't like the blocky frames used in GTK gui's with gtk-kde4.  


Anyway, I was looking at the project page for gtk-kde4 and there is a beta out that is suppose to fix the display of frames, tabs, etc.

After modifying the cmakeLists.txt similiar to Tex's fix for the previous version, I am getting a weird error from cpio when it tries to package the RPM (..it seems to build just fine):

Code: [Select]
Warning: unused libraries in /usr/lib/kde4/libexec/makeSymlink: libpthread.so.0
 libkdesu.so.5
 libQtDBus.so.4
 libm.so.6
 libgcc_s.so.1

Processing files: gtk-kde4-0.9.5b-1travisn0002010
Finding  Provides: /usr/lib/rpm/mandriva/filter.sh ' ' /usr/lib/rpm/mandriva/find-provides
Using BuildRoot: /home/tln/src/tmp/gtk-kde4-0.9.5b-1travisn0002010-buildroot to search libs
Finding  Requires: /usr/lib/rpm/mandriva/filter.sh ' ' /usr/lib/rpm/mandriva/find-requires /home/tln/src/tmp/gtk-kde4-0.9.5b-1travisn0002010-buildroot i586
Provides: kcm_gk4.so
Requires(interp): /bin/sh /bin/sh
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(post): /bin/sh
Requires(postun): /bin/sh
Requires: glibc >= 2.10.1 libstdc++6 >= 4.4.1 /bin/sh /bin/sh rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3) libgcc_s.so.1 libkdecore.so.5 libkdesu.so.5 libkdeui.so.5 libm.so.6 libpthread.so.0 libQtCore.so.4 libQtDBus.so.4 libQtGui.so.4 libQtSvg.so.4 libstdc++.so.6 libstdc++.so.6(GLIBCXX_3.4)
Conflicts: gtk-oxygen-molecule
Obsoletes: gtk-qt-engine
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/tln/src/tmp/gtk-kde4-0.9.5b-1travisn0002010-buildroot
Wrote: /home/tln/src/rpm/SRPMS/gtk-kde4-0.9.5b-1travisn0002010.src.rpm
error: create archive failed on file /home/tln/src/tmp/gtk-kde4-0.9.5b-1travisn0002010-buildroot/etc/xdg/autostart/gtk-kde4.desktop: cpio: open failed - Bad file descriptor


RPM build errors:
    create archive failed on file /home/tln/src/tmp/gtk-kde4-0.9.5b-1travisn0002010-buildroot/etc/xdg/autostart/gtk-kde4.desktop: cpio: open failed - Bad file descriptor



My "work-in-progress" SRPM using the beta can be found here if anyone want to try and fix it:

http://dl.dropbox.com/u/2425248/gtk-kde4-0.9.5b-1travisn0002010.src.rpm
  
(..after re-installing gtk-oxygen-molecule my issues with right click menus fixed itself!  ::))
« Last Edit: December 26, 2010, 02:45:39 PM by travisn000 »

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: First Packaging Attempt, Need Help w/Cmake Error
« Reply #13 on: December 26, 2010, 02:32:22 PM »
I think I may have found the problem...

/home/tln/src/tmp/gtk-kde4-0.9.5b-1travisn0002010-buildroot/etc/xdg/autostart/gtk-kde4.desktop  is an empty file!  ???

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: gtk-kde4 cmake error
« Reply #14 on: December 26, 2010, 05:30:04 PM »
I had the same problem as you travisn000 when trying to update to 0.9.5b, see http://www.pclinuxos.com/forum/index.php/topic,82581.0.html.  I contacted the developer and he's not sure what the problem is, but if the desktop file is empty, then it's empty. I spent a full day of hair tearing trying to get it to build. I also had to patch the crap out of the makefile just to get it to build at all. I've since dumped gtk-kde4 for gtk-oxygen-engine(which the developers have since renamed oxygen-gtk) because it actually works, unlike gtk-kde4 which has always been buggy, and gtk-oxygen-molecule which does not obey kde system colors.

Quote
Unlike other attempts made to port the kde oxygen theme to gtk, this attempt does not depend on Qt (via some Qt to Gtk conversion engine), nor does render the widget appearance via hard coded pixmaps, which otherwise breaks everytime some setting is changed in kde.


My suggestion is to forget gtk-kde4 and give gtk-oxygen-engine a try, I'm quite pleased with it.

Cheers