Blackbox WM installation issue

I believe this to be a specific blackbox code issue as opposed to an SUSE issue, but felt should ask the community before heading off to blackbox wiki incase someone has seen this issue before or incase someone see’s this issue later with our openSUSE.

Environment Detail : Acer aspire one D255 netbook, opensuse 11.4, kernal source, syms and gcc installed.

Previous thread : Blackbox installing problem
Post which was asked to post in development.

Issue:
At first
"Image.cc:1350:42: error: ‘memcpy’ was not declared in this scope

Found out the solution by just reading up “memcopy c++” through google and when looked into the code library files (in this case Image.cc, Resource.cc) fixed them and ran make as su. Hit another one, which looks like a code issue again.

Current issue
Util.cc:197:64: error: ‘std::string bt::textPropertyToString(Display*, XTextProperty&)’ should have been declared inside 'bt

The function causing issue

std::string bt::textPropertyToString(:: Display *display,
:: XTextProperty& text_prop) {
std::string ret;

if (text_prop.value && text_prop.nitems > 0) {
if (text_prop.encoding == XA_STRING) {
ret = reinterpret_cast<char *>(text_prop.value);
} else {
text_prop.nitems = strlen(reinterpret_cast<char *>(text_prop.value));

char **list;
int num;
if (XmbTextPropertyToTextList(display, &text_prop,
&list, &num) == Success &&
num > 0 && *list) {
ret = *list;
XFreeStringList(list);
}
}
}

return ret;
}

Can someone help out ?

Please note that there is no space between :: and D, :: and X in the function declaration line (highlighted in green). Had to do it to make sure that no emotions are put into the text

Hi
Looks like the same error in this bug;
Bug 348556 – x11-wm/blackbox-0.70.1 fails to build with >=x11-libs/libX11-1.4.0
Not very clear on the fix…

Your original error was fixed by adding the following?


#include <string.h>

You only need to run make install as root or use sudo, configure and make as your user.

Yes, the first issue with memcpy was fixed when I added #include<string.h> into Image.cc and Resource.cc in blackbox/lib folder and ran make.

Post which i saw this error about “string bt” which looked like a code/declaration/syntax issue.

will verify the link and try another run of configure and make as myself and make install (if i get past the make) as root as sudo make install.

Will update tonight (AEST)

Hi
OK, this should fix it;


sed -i -e "s/_XUTIL_H_/_X11&/" lib/Util.hh

That’s replacing XUTIL_H with _X11& in the file lib/Util.hh

Great!.. will try it when i get back home.
Also have raised a bug with blackbox (Artifact 3239068) and will update in the next 10 hours.

Cheers.

this piece of code is basically full of errors!!.. Malcolmlewis, your fix worked and I did move ahead in the chain, but hit another one!

XDG.cc: In function ‘std::list<std::basic_string<char> > readEnvDirList(const char*, const char*)’:
XDG.cc:65:38: error: ‘find’ is not a member of ‘std’
the blackbox version am working on is .70.1.

I guess its more debugging for me, but would appreciate any help! :slight_smile:

viktordtn wrote:
> viktordtn;2310964 Wrote:
>> Great!.. will try it when i get back home.
>> Also have raised a bug with blackbox (Artifact 3239068) and will update
>> in the next 10 hours.
>>
>> Cheers.
>
> this piece of code is basically full of errors!!

I’m only skimming but this statement rings alarm bells. AFAIK, blackbox
is a fairly well-known and stable WM. As such, it’s unlikely to be “full
of errors”, so instead I would be looking for problems such as the wrong
compilation environment or toolchain or somesuch.

Just a thought.

agree and that what I would have thought as well… that it would be stable, but i see alot of issues because its not available through yast in opensuse. But ur point is also right that might be an environment that i need to fix instead of changing all these files and as a matter of fact, i did change quite a few in lib src folders. It was quite a few and the only reason i updated these files with string.h is where there were reference to string functions.

Post all that I am having another issue…now

…/lib/.libs/libbt.a(Unicode.o): In function convert<std::basic_string<unsigned int>, std::basic_string<char> >': /home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:86: undefined reference to libiconv_open’
/home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:113: undefined reference to libiconv' /home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:155: undefined reference to libiconv_close’
…/lib/.libs/libbt.a(Unicode.o): In function bt::hasUnicode()': /home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:197: undefined reference to libiconv_open’
/home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:204: undefined reference to libiconv_close' ../lib/.libs/libbt.a(Unicode.o): In function convert<std::basic_string<char>, std::basic_string<unsigned int> >’:
/home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:86: undefined reference to libiconv_open' /home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:113: undefined reference to libiconv’
/home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib/Unicode.cc:155: undefined reference to `libiconv_close’
collect2: ld returned 1 exit status
make[2]: *** [blackbox] Error 1

I know i have libiconv installed properly as per the documentation that comes with libiconv. I couldnt find a yast package, so downloaded it and installed it as per the instrucution.

Cnt go on anymore tonight… but could really use some help with this.

Hi
Just had a look on the build service and blackbox 0.70.1 is there, just not built for 11.4 (They haven’t enabled the repository), unfortunately the build service is down for maintenance for an hour or so. Once back up I’ll post the link.

Else grab the src rpm and rebuild that;


wget -c ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/X11%3A/windowmanagers/openSUSE_Factory/src/blackbox-0.70.1-114.10.src.rpm
rpmbuild --rebuild

Thank you Malcolm… I just tried these steps and got an error during the build… Happened during autoreconf run. It complained that the package is missing the alocal file which I did find in the original source file from blackbox.

  • autoreconf -fi
    Can’t exec “aclocal”: No such file or directory at
    /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
    autoreconf: failed to run aclocal: No such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.cNYvx8 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.cNYvx8 (%build)

On Thu, 2011-03-24 at 22:36 +0000, viktordtn wrote:
> Thank you Malcolm… I just tried these steps and got an error during the
> build… Happened during autoreconf run. It complained that the package
> is missing the alocal file which I did find in the original source file
> from blackbox.
>
>
> + autoreconf -fi
> Can’t exec “aclocal”: No such file or directory at
> /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
> autoreconf: failed to run aclocal: No such file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.cNYvx8 (%build)
>
>
> RPM build errors:
> Bad exit status from /var/tmp/rpm-tmp.cNYvx8 (%build)
>
Hi
Hi install autoconf and automake. It also looks like they dropped
blackbox from the repository… so at least you have a src rpm :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.29-0.3-default
up 4 days 1:15, 3 users, load average: 0.51, 0.54, 0.41
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.26

thanks, will try this when I get back home… :slight_smile:

Yeh, i guess i understand why this was pulled off the repository! :D… buts its a shame, because I feel this WM is a good one when compared to the ones we have… should be in the repository… at least from an “available options” point of view… not a big fan of fluxbox thats y.!

guess what happened… hit the same issue that i did with the source. Also the source has another dependency on libtool to be installed.

Util.cc:197:64: error: 'std::string bt::textPropertyToString(Display, XTextProperty&)’ should have been declared inside ‘bt’*
make[2]: *** [Util.lo] Error 1
make[2]: Leaving directory /usr/src/packages/BUILD/blackbox-0.70.1/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /usr/src/packages/BUILD/blackbox-0.70.1’
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.12XVRh (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.12XVRh (%build)

:frowning:

On Fri, 2011-03-25 at 10:06 +0000, viktordtn wrote:
> guess what happened… hit the same issue that i did with the source.
> Also the source has another dependency on libtool to be installed.
>
>
> Util.cc:197:64: error: 'std::string bt::textPropertyToString(Display,
> XTextProperty&)’ should have been declared inside ‘bt’*
> make[2]: *** [Util.lo] Error 1
> make[2]: Leaving directory
> `/usr/src/packages/BUILD/blackbox-0.70.1/lib’

make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/blackbox-0.70.1’
> make: *** [all] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.12XVRh (%build)
>
>
> RPM build errors:
> Bad exit status from /var/tmp/rpm-tmp.12XVRh (%build)
>
>
> :frowning:
>
Hi
:frowning: I won’t get a chance to look for a few days, but will look at
uploading to my home repository on the build service and having a
play…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.29-0.3-default
up 4 days 16:01, 3 users, load average: 0.20, 0.12, 0.09
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.26

thanks malcom… will wait no worries… and will keep searching… and look at the posts for any updates

Hi
All built, keep an eye out here;
software.opensuse.org: Search Results

Look for the home:/malcolmlewis:/Testing/openSUSE_11.4 repository.

ok will do… updates from my side…

went past the last error above with the four steps below

  1. uninstalled libiconv-1.13.1
  2. Downloaded version 1.9.2 and installed it (./configure, make and sudo make install)
  3. opened lib/Unicode.cc and updated #include <iconv.h> to #include </usr/include/iconv.h>
  4. re-ran blackbox installation - from configure ; make.

The new error am looking at is…



Unicode.cc: In function 'void bt::convert(const char*, const char*, const _Source&, _Target&) [with _Source = stdng<char>, _Target = std::basic_string<unsigned int>]':
Unicode.cc:220:49:   instantiated from here
Unicode.cc:113:62: error: invalid conversion from 'const char**' to 'char**'
Unicode.cc:113:62: error:   initializing argument 2 of 'size_t libiconv(void*, char**, size_t*, char**, size_t*)'
Unicode.cc: In function 'void bt::convert(const char*, const char*, const _Source&, _Target&) [with _Source = stdng<unsigned int>, _Target = std::basic_string<char>]':
Unicode.cc:233:58:   instantiated from here
Unicode.cc:113:62: error: invalid conversion from 'const char**' to 'char**'
Unicode.cc:113:62: error:   initializing argument 2 of 'size_t libiconv(void*, char**, size_t*, char**, size_t*)'
make[2]: *** [Unicode.lo] Error 1
make[2]: Leaving directory `/home/vighi/Softwares/blackbox/blackbox-0.70.1-old/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vighi/Softwares/blackbox/blackbox-0.70.1-old'
make: *** [all] Error 2



The problem am having now is that am getting a bit concerened if i am doing the right things or not… i mean, the blackbox dev team wouldnt just put up a src package with errors… :\ but am still going ahead! lol!

On Sat, 2011-03-26 at 06:36 +0000, viktordtn wrote:
> The problem am having now is that am getting a bit concerened if i am
> doing the right things or not… i mean, the blackbox dev team wouldnt
> just put up a src package with errors… :\ but am still going ahead!
> lol!
>
Hi
All you need to do is download the built rpm for your arch and install,
no need to do any more compiling??


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.29-0.3-default
up 5 days 13:43, 2 users, load average: 0.24, 0.09, 0.02
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.26

yep thats all i did with the src rpm u gave me… The source package from blackbox and the libiconv is the only ones i have been changing…

this last error has got me in a spot now :slight_smile:

On Sat, 2011-03-26 at 22:06 +0000, viktordtn wrote:
> malcolmlewis;2312456 Wrote:
> > On Sat, 2011-03-26 at 06:36 +0000, viktordtn wrote:
> > > The problem am having now is that am getting a bit concerened if i
> > am
> > > doing the right things or not… i mean, the blackbox dev team
> > wouldnt
> > > just put up a src package with errors… :\ but am still going ahead!
> > > lol!
> > >
> > Hi
> > All you need to do is download the built rpm for your arch and
> > install,
> > no need to do any more compiling??
> >
>
> yep thats all i did with the src rpm u gave me… The source package
> from blackbox and the libiconv is the only ones i have been changing…
>
> this last error has got me in a spot now :slight_smile:
>
>
Hi
All you need to do is install the rpm for your arch from my test
repository, it’s all built for 11.4…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.29-0.3-default
up 6 days 6:11, 2 users, load average: 0.56, 0.33, 0.19
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.26