You are not logged in.
Hi. I'm new to Arch Linux (just installed it a few days ago; I had been using Kubuntu for some years now), and so I'm also new to AUR. If this isn't the place to post this, please accept my apologies and redirect me to the right place.
As per the guidelines, to install this package I downloaded the PKGBUILD, the nethack-qt.desktop file and the nethack-qt.patch file. Then I ran makepkg.
It fails. The last lines from the output are:
cc -O -I../include -c ../win/X11/winval.c
make[2]: se ingresa al directorio `/home/bruno321/src/nethack-3.4.3/util'
cc -O -I../include -o tilemap ../win/share/tilemap.c
./tilemap
make[2]: se sale del directorio `/home/bruno321/src/nethack-3.4.3/util'
cc -O -I../include -c -o tile.o tile.c
/opt/qt/bin/moc -o qt_win.moc ../include/qt_win.h
/opt/qt/bin/moc -o qt_kde0.moc ../include/qt_kde0.h
/opt/qt/bin/moc -o qttableview.moc ../include/qttableview.h
g++ -O -I../include -I. -I/opt/qt/include -c ../win/Qt/qt_win.cpp
In file included from /opt/qt/include/qcstring.h:46,
from /opt/qt/include/qstring.h:42,
from /opt/qt/include/qwindowdefs.h:44,
from /opt/qt/include/qwidget.h:42,
from /opt/qt/include/qdialog.h:42,
from ../include/qt_win.h:19,
from ../win/Qt/qt_win.cpp:77:
/usr/include/string.h: In function 'char* strchr(char*, int)':
/usr/include/string.h:474: error: redefinition of 'char* strchr(char*, int)'
/usr/include/string.h:220: error: se define 'char* strchr(char*, int)' previamente aquí
/usr/include/string.h: In function 'const char* strchr(const char*, int)':
/usr/include/string.h:480: error: redefinition of 'const char* strchr(const char*, int)'
/usr/include/string.h:226: error: se define 'const char* strchr(const char*, int)' previamente aquí
/usr/include/string.h: In function 'char* strrchr(char*, int)':
/usr/include/string.h:502: error: redefinition of 'char* strrchr(char*, int)'
/usr/include/string.h:247: error: se define 'char* strrchr(char*, int)' previamente aquí
/usr/include/string.h: In function 'const char* strrchr(const char*, int)':
/usr/include/string.h:508: error: redefinition of 'const char* strrchr(const char*, int)'
/usr/include/string.h:253: error: se define 'const char* strrchr(const char*, int)' previamente aquí
../win/Qt/qt_win.cpp: At global scope:
../win/Qt/qt_win.cpp:4443: aviso: la variable '<anonymous struct> key_macro []' que no es local usa un tipo anónimo
make[1]: *** [qt_win.o] Error 1
make[1]: se sale del directorio `/home/bruno321/src/nethack-3.4.3/src'
make: *** [nethack-qt] Error 2
==> ERROR: Falló la compilación.
Abortando...So, how can I do to install nethack-qt? Am I doing something wrong (or haven't I done something I should have) or is it a problem with the package? If so, shouldn't it be fixed?
Thank you for any help.
Last edited by bruno321 (2010-03-08 23:22:15)
Offline
From the look of the errors, you need a patch for compatibility for newer toolchains.
Offline
This should help: http://gcc.gnu.org/gcc-4.4/porting_to.html
Also next time you're asking for help on the forums it helps to run with LC_ALL=en_US since not everyone will be able to understand the meaning of error messages in non-english languages (unless you're posting to a non-english forum of course)
[git] | [AURpkgs] | [arch-games]
Offline
Please bear in mind that I'm no programmer or Arch guru. The link Daenyth provided might be helpful for a programmer that could put it to use, not to me. If you could elaborate perhaps I could fix it myself, but as you surely noticed from the first post, I'm really a newbie in these matters.
Also, sorry for the locale thing: I will bear it in mind for the next time.
Offline
Ok!! So, after retrying several times and trying different things I found out how to do it.
Here was the solution, I had seen it since the beginning but didn't know how to apply it (since as I already stated I'm no AUR guru).
Anyway, here's how:
Download the PKGBUILD, the nethack-qt.desktop file, the nethack-qt.patch and nethack-343-src.tgz. Extract the last file, edit /sys/Unix/Makefile.src and "add D__CORRECT_ISO_CPP_STRINGS_H_PROTO to CFLAGS" as elvaka said on AUR. Now, retar the file with the same name, nethack-343-src.tgz .
If we makepkg now, it will fail because of the integrity test. Here's how to bypass it:
Edit the PKGBUILD, comment the three md5sums lines as here:
# md5sums=('21479c95990eefe7650df582426457f9'
# 'f8a168c25ad704fb79e9180275528059'
# '6a426c8f1c2763fcbed05bb1222a584a')
and now we use makepkg like this: "makepkg --skipinteg". That should do it. Now just "pacman -U nethack-qt-3.4.3-2-i686.pkg.tar.gz", and that should be it.
Cheers
Offline
bruno321
Really no need to re-tar that. Let makepkg untar it and fail... then go to the src/pkgname/sys/Unix/Makefile.src (or what ever the path really is) , do your edits, then you can just run makepkg -e
which will use the Existing source (src) directory and not untar over the top.
OR if you DO re pack the source you can just run makepkg -g >> PKGBUILD and it will generate a new, correct MD5sum and append it into the PKGBUILD.
makepkg -h
EDIT see now you are well on your way to being an "AUR guru" ![]()
Last edited by jwbirdsong (2010-04-04 03:22:45)
PLEASE read and try to FIX/FILE BUGS instead of assuming other have/will.
Offline
Don't get intimidated by the fact that it's source code. Most of them require adding one "#include" line and that's all. It's really not as hard as you think. And hey, you might learn something ![]()
[git] | [AURpkgs] | [arch-games]
Offline