You are not logged in.

#1 2012-06-22 23:55:48

Eithrial
Member
Registered: 2012-06-22
Posts: 22

[SOLVED] Krusader compilation via abs error

I tried to compile Krusader using PKGBUILD from abs. I have base-devel installed, but I got in the end error:

Linking CXX static library ../../lib/libPanel.a
[ 76%] Built target Panel
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Application is compiled via Cmake. Ive made litle research but couldn't find solution. Sorry for so few info but I don't really know what would you like more to be able to help, so please just let me know so I could deliver more information.

Thanks for any help!

Last edited by Eithrial (2012-06-25 17:05:10)

Offline

#2 2012-06-23 01:30:32

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: [SOLVED] Krusader compilation via abs error

The rest of the build output would be helpful.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2012-06-23 08:43:31

elp
Member
Registered: 2007-04-10
Posts: 27

Re: [SOLVED] Krusader compilation via abs error

Sorry but what's wrong doing a: sudo pacman -S krusader ?

Offline

#4 2012-06-24 10:34:56

Eithrial
Member
Registered: 2012-06-22
Posts: 22

Re: [SOLVED] Krusader compilation via abs error

Stebalien wrote:

The rest of the build output would be helpful.

Here it is: http://pastebin.com/DUUHESJD

Sorry but what's wrong doing a: sudo pacman -S krusader ?

Nothing. I just want to learn something new so I compile different software by myself.


Not sure if helpful, but I'll add output of:
pacbuilder --gccinfo

Carch: x86_64
Chost: x86_64-unknown-linux-gnu
Cflags: -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
Cxxflags: -march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
Makeflags: -j3

Last edited by Eithrial (2012-06-24 12:29:47)

Offline

#5 2012-06-24 14:43:03

sitquietly
Member
From: On the Wolf River
Registered: 2010-07-12
Posts: 219

Re: [SOLVED] Krusader compilation via abs error

Eithrial wrote:

I tried to compile Krusader using PKGBUILD from abs. I have base-devel installed, but I got in the end error.....

I tried your compilation from abs on my system and got your same build failure.  I always build with the "--log" option to makepkg and in a case like this open the build log file and search for the error.  There are lots of warnings about things like "unused parameter" "ignoring return value" and such.  Find the first error.  In your case I searched for the word "error" and came to a line with "error: ‘make_pair’ was not declared in this scope". 

So enter that error into a google search (krusader error: ‘make_pair’ was not declared in this scope) and near the top of the list is a link to an Archlinux bug report page for the krusader package, https://bugs.archlinux.org/task/29429

There you find a Comment by Karol (Kudlaty) - Tuesday, 17 April 2012, 16:00 GMT

ok, compiling error fixed by changing:
make_pair => std::make_pair

There's your fix big_smile

The file with the error, from the build log, was src/krusader-2.4.0-beta1/krusader/UserAction/tstring.h (of course open that file and see where make_pair is used).  The two invocations of make_pair need to become std::make_pair, so the fixed build function in our PKGBUILD becomes

build() {
  cd "${srcdir}"
  sed -i 's/make_pair/std::make_pair/' krusader-2.4.0-beta1/krusader/UserAction/tstring.h
  mkdir build
  cd build
  cmake ../${pkgname}-${_pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

With the addition of that one sed line to the pkgbuild the krusader package now builds ok.  Always run namcap on your built package: in this case namcap tells us that we got all of the dependencies right and the package looks ok.

Offline

#6 2012-06-24 14:47:55

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: [SOLVED] Krusader compilation via abs error

It's a bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667231
The workaround is to add -fpermissive to the CXXFLAGS (prepend `CXXFLAGS="$CXXFLAGS -fpermissive"` to the cmake line).
Reported: FS#30424 (with patch).

-- edit: Your way is probably a better way. Feel free to update the bug report.

Last edited by Stebalien (2012-06-24 14:50:55)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#7 2012-06-24 15:01:44

sitquietly
Member
From: On the Wolf River
Registered: 2010-07-12
Posts: 219

Re: [SOLVED] Krusader compilation via abs error

Sorry but what's wrong doing a: sudo pacman -S krusader ?

Nothing. I just want to learn something new so I compile different software by myself.


Not sure if helpful, but I'll add output of:
pacbuilder --gccinfo
...


I agree with Daniel Robbins on this issue of "why do you try to rebuild Arch packages when somebody already built it once upon a time on some computer with probably different versions of the libraries and a different toolchain...".  The First Law of Software Systems:  the software must build from source code reliably at all times.  If you can't build it today you've lost control along the way.  Check out the values of Funtoo,
  http://www.funtoo.org/wiki/Funtoo_Linux_Vision

I have a word of advice for the OP from my own experience.  If you want to learn how to build your own system from source stop using pacbuilder and other automation scripts until you've learned what's going on underneath.  Do it manually with simpler tools like abs/makepkg; maybe you'll eventually write your own bash scripts to automate things.

Offline

#8 2012-06-25 17:36:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Krusader compilation via abs error

Eithrial: please do not blank posts, it makes for disjointed threads and is disrespectful of the other contributors...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2012-06-25 17:57:13

Eithrial
Member
Registered: 2012-06-22
Posts: 22

Re: [SOLVED] Krusader compilation via abs error

Ok, sorry. I just decided that my new problem creates off-topic and It would be better to move it to new thread which Im going to create in a moment.

Offline

Board footer

Powered by FluxBB