LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Building KDE 4.8.5 from Slackware sources - few remarks (https://www.linuxquestions.org/questions/slackware-14/building-kde-4-8-5-from-slackware-sources-few-remarks-4175457103/)

kikinovak 04-06-2013 05:00 AM

Building KDE 4.8.5 from Slackware sources - few remarks
 
Hi,

I'm currently building KDE 4.8.5 from the Sources found on the Slackware DVD. If you wonder why I would do such a thing: I'd like to tweak the KDE desktop like Tomas M. from Slax did: only build needed apps, and don't build those I never intend to use. Plus, build in a few enhancements.

First things first, one dragon at a time.

The master KDE.SlackBuild allows either building all KDE packages in one go, or build modules individually by passing them as an argument. All modules are listed in the script, around the line 420:

Code:

KDEMODS=" \
  kdelibs \
  kdepimlibs \
  kdebase \
  kdesdk \
  kdegraphics \
  kdebindings \
  kdebase:kde-workspace \
  kdeaccessibility \
  kdeutils \
  kdelibs \
  kdemultimedia \
  extragear:libktorrent \
  kdenetwork \
  oxygen-icons \
  kdeadmin \
  kdeartwork \
  kdegames \
  kdetoys \
  kdepim \
  kdepim-runtime \
  kdeedu \
  kdewebdev \
  kdeplasma-addons \
  polkit-kde \
  extragear \
  "

First strange thing that strikes me. When I build the first module like this:

Code:

# ./KDE.SlackBuild kdelibs
... the module compiles fine, but then:
  1. makepkg builds the package.
  2. It gets installed.
  3. makepkg builds the package again immediately afterwards.
  4. It gets "updated" with itself.

Is this intended or just a minor bug in the build script?

Cheers,

Niki

phenixia2003 04-06-2013 05:57 AM

Hello,

This is documented in the SlackBuild:

Code:

# Yes, we know kde-workspace is built twice.  kdebase needs the
#  plasma bits from it, and then we build it again for good measure...
# Same goes for kdelibs (at least during KDE 4.8.x) kdeutils:ksecrets needs
kdelibs and then kdelibs needs a rebuild to pick up ksecretservice
#  (this will no longer be required in KDE 4.9).
KDEMODS=" \
  kdelibs \
  kdepimlibs \
  kdebase \
  kdesdk \
  kdegraphics \
  kdebindings \
  kdebase:kde-workspace \
  kdeaccessibility \
  kdeutils \
  kdelibs \
  kdemultimedia \
  extragear:libktorrent \
  kdenetwork \
  oxygen-icons \
  kdeadmin \
  kdeartwork \
  kdegames \
  kdetoys \
  kdepim \
  kdepim-runtime \
  kdeedu \
  kdewebdev \
  kdeplasma-addons \
  polkit-kde \
  extragear \
  "

--
SeB

kikinovak 04-06-2013 06:55 AM

Yes, I know kdebase is built twice. But here, the package is compiled twice immediately after the first build. That's something else. I'm talking about the package construction with makepkg immediately after the first build.

Alien Bob 04-06-2013 07:48 AM

It's a side effect of having "kdelibs" both as the name of a module sub-package (inside modules/kdelibs) and as the module name itself (modules/kdelibs). This should be optimized at some point. But it does not hurt, so the priority is low...

Eric

volkerdi 04-06-2013 09:11 AM

Quote:

Originally Posted by Alien Bob (Post 4926242)
It's a side effect of having "kdelibs" both as the name of a module sub-package (inside modules/kdelibs) and as the module name itself (modules/kdelibs). This should be optimized at some point. But it does not hurt, so the priority is low...

It was optimized. The sources that are in -current right now don't do this. I made the fixes in the script when 4.10.1 went into -current (4.10.2 is there now, BTW).

kikinovak 04-06-2013 09:55 AM

Thanks for the clarification. Now I've found some other curiosity that's bugging me. Here goes.

The master KDE.SlackBuild calls a series of custom cmake scripts:

Code:

      # Run cmake, using custom cmake script if needed:
      if [ -r $CWD/cmake/${PKGNAME} ]; then
        . $CWD/cmake/${PKGNAME}
      else
        # This is the default configure script:
        . $CWD/cmake/cmake
      fi

This works fine for kdelibs for example. If I put something (echo "YATAHONGAGA!!!") at the top of cmake/kdelibs and then run this:

Code:

# ./KDE.SlackBuild kdelibs
... I'll see my random line fly by at the top of the configuration lines.

But the same thing seems to fail with cmake/kdebase. Meaning I can add whatever I want at the top of cmake/kdebase and then run this:

Code:

# ./KDE.SlackBuild/kdebase
... it will just get ignored.

So I have to conclude cmake/kdebase is ignored by the master script. Which is a pity, because that's precisely where I would have put my customizations, like specifying which apps to build and which to leave out (like Konqueror for example).

Any idea what's wrong here?

kikinovak 04-06-2013 10:07 AM

OK, I'll answer that myself, I think I just found out. If there's no file in the cmake directory corresponding to the exact module name (like kde-baseapps) and not the mere "big" package name (like kdebase), then the default 'cmake' file is included.

Now here's the solution to the problem:

Code:

# cd cmake
# cp kdebase kde-baseapps

Edit this file like this, for example:

Code:

cat CMakeLists.txt | \
  grep -v "add_subdirectory( konqueror )" | \
  grep -v "add_subdirectory( keditbookmarks )" | \
  grep -v "add_subdirectory( konq-plugins )" \
  > yatahongaga
mv yatahongaga CMakeLists.txt
mkdir -p build
cd build
  cmake \
    $KDE_OPT_ARGS \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DMAN_INSTALL_DIR=/usr/man \
    -DSYSCONF_INSTALL_DIR=/etc/kde \
    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
    -DRUN_KAPPFINDER=ON \
    ..

Now the kde-baseapps module will be built without Konqueror.

kikinovak 04-06-2013 12:02 PM

BTW, I'd be curious to know what XAP stuff is exactly needed for various KDE packages to either build or run.

Alien Bob 04-06-2013 01:37 PM

Quote:

Originally Posted by kikinovak (Post 4926387)
BTW, I'd be curious to know what XAP stuff is exactly needed for various KDE packages to either build or run.

Capture a log of your KDE compilation and look for these lines:
Code:

The following OPTIONAL packages could NOT be located on your system.
That will tell you exactly what you could optionally add (some of the stuff you'll see is not part of Slackware at all by the way).
If any required software is missing, you will not even get past the "cmake" step of the module.

Eric

Woodsman 04-06-2013 01:53 PM

I would be grateful if the OP would post a copy of these customized scripts! :) I started tinkering with the same idea --- to create a custom package set with only the desired elements. I've been busy and never got very far.

Alien Bob 04-06-2013 02:10 PM

Quote:

Originally Posted by Woodsman (Post 4926434)
I would be grateful if the OP would post a copy of these customized scripts! :) I started tinkering with the same idea --- to create a custom package set with only the desired elements. I've been busy and never got very far.

Kikinovak already did: https://github.com/kikinovak/worksta...4.0/source/kde

Eric

kikinovak 04-06-2013 03:54 PM

Quote:

Originally Posted by Alien Bob (Post 4926426)
Capture a log of your KDE compilation and look for these lines:
Code:

The following OPTIONAL packages could NOT be located on your system.
That will tell you exactly what you could optionally add (some of the stuff you'll see is not part of Slackware at all by the way).
If any required software is missing, you will not even get past the "cmake" step of the module.

Eric

OK, thanks, Eric!

kikinovak 04-06-2013 03:56 PM

Quote:

Originally Posted by Alien Bob (Post 4926442)

Careful! This is really only a work in progress, and currently in a highly unusable state. I'll keep you posted once I've "reached a green twig", as we say in Austria.

Woodsman 04-06-2013 04:20 PM

Okay, thanks. My big bump right now is I can't figure out how to build Qt4 with the QT_NO_TOOLTIP option. The build always fails. :(

kikinovak 04-06-2013 04:27 PM

Well, just ignore the tooltips. Or as some yoga teacher once said to me: don't think about that pink elephant. :D

Woodsman 04-06-2013 07:25 PM

Quote:

Well, just ignore the tooltips. Or as some yoga teacher once said to me: don't think about that pink elephant.
Yeah, I guess that is the "KDE Way" --- pretend a problem doesn't exist. ;)

kikinovak 04-07-2013 01:57 AM

Quote:

Originally Posted by Woodsman (Post 4926554)
Yeah, I guess that is the "KDE Way" --- pretend a problem doesn't exist. ;)

More like square pegs and round holes. :p

kikinovak 04-07-2013 12:50 PM

Here's another curiosity. The KDE-specific desktop menu entry files in /usr/share/applications/kde4 all have rwxr-xr-x (755) permissions, instead of "plain" 644. Of course, it's just a minor weirdness, but I thought I'd report it anyway.

Woodsman 04-07-2013 01:48 PM

Quote:

Here's another curiosity. The KDE-specific desktop menu entry files in /usr/share/applications/kde4 all have rwxr-xr-x (755) permissions, instead of "plain" 644.
Likewise in /usr/share/autostart. :)

kikinovak 04-09-2013 07:27 AM

OK, now I have a more serious problem. The 'kdemultimedia' package can be built against ffmpeg. But when doing so, I get the following error.

Code:

...
/tmp/microlinux/kde-build/kdemultimedia/kdemultimedia-4.8.5/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp: In member function ‘void ffmpegthumbnailer::MovieDecoder::destroy()’:
/tmp/microlinux/kde-build/kdemultimedia/kdemultimedia-4.8.5/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp:92:9: attention : ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations]
/tmp/microlinux/kde-build/kdemultimedia/kdemultimedia-4.8.5/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp:92:45: attention : ‘void av_close_input_file(AVFormatContext*)’ is deprecated (declared at /usr/include/libavformat/avformat.h:1533) [-Wdeprecated-declarations]
/tmp/microlinux/kde-build/kdemultimedia/kdemultimedia-4.8.5/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp: In member function ‘void ffmpegthumbnailer::MovieDecoder::initializeVideo()’:
/tmp/microlinux/kde-build/kdemultimedia/kdemultimedia-4.8.5/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp:149:9: attention : ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3380) [-Wdeprecated-declarations]
/tmp/microlinux/kde-build/kdemultimedia/kdemultimedia-4.8.5/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp:149:57: attention : ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/include/libavcodec/avcodec.h:3380) [-Wdeprecated-declarations]
make[2]: *** [ffmpegthumbs/CMakeFiles/ffmpegthumbs.dir/ffmpegthumbnailer/moviedecoder.o] Erreur 1
make[1]: *** [ffmpegthumbs/CMakeFiles/ffmpegthumbs.dir/all] Erreur 2
make: *** [all] Erreur 2
kdemultimedia failed to build.

Any idea what's going on?


All times are GMT -5. The time now is 02:37 AM.