You are not logged in.

#1 2014-09-17 04:10:20

mek42
Member
Registered: 2014-09-14
Posts: 15

[SOLVED] which bash environment variable for path to C++ header file?

I'm a little rusty and forgot how to setup bash environment variables for when a header file is not found during compile.

I was building kmid2 from AUR with yaourt and had the following problem:

In file included from /tmp/yaourt-tmp-mark/aur-kmid2/src/kmid-2.4.0/alsa/alsabackend.cpp:21:0:
/tmp/yaourt-tmp-mark/aur-kmid2/src/kmid-2.4.0/alsa/alsamidiobject.h:24:24: fatal error: alsaclient.h: No such file or directory
 #include <alsaclient.h>
                        ^
compilation terminated.
alsa/CMakeFiles/kmid_alsa.dir/build.make:82: recipe for target 'alsa/CMakeFiles/kmid_alsa.dir/alsabackend.o' failed
make[2]: *** [alsa/CMakeFiles/kmid_alsa.dir/alsabackend.o] Error 1
CMakeFiles/Makefile2:343: recipe for target 'alsa/CMakeFiles/kmid_alsa.dir/all' failed
make[1]: *** [alsa/CMakeFiles/kmid_alsa.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

My Arch system is only a couple days old.  I verified that drumstick was installed and that alsaclient.h was where the package file list said it should be ( https://www.archlinux.org/packages/comm … drumstick/ ).  I then tried adding to .bashrc

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/include/drumstick

started a new bash shell to no avail.  I repeated the process with LIBRARY_PATH, which also resulted in failure.  I know that this is something very basic, I just can't remember what I need to do.

So, which bash environment variable do I need to point to /usr/include/drumstick?  Or do I need to use CFLAGS or something?

Last edited by mek42 (2014-09-18 05:25:45)

Offline

#2 2014-09-17 04:30:50

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

Re: [SOLVED] which bash environment variable for path to C++ header file?

Please use code tags when pasting to the boards https://wiki.archlinux.org/index.php/Fo … s_and_Code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-09-17 05:11:10

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [SOLVED] which bash environment variable for path to C++ header file?

You do not need to set anything. PKGBUILD file should resolve all dependencies for you. alsaclient.h should be already installed on your machine under /usr/include/drumstick/ directory.

The best thing for you is to report it to AUR project page and work with the maintainer on resolving the issue.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#4 2014-09-17 15:47:37

mek42
Member
Registered: 2014-09-14
Posts: 15

Re: [SOLVED] which bash environment variable for path to C++ header file?

I made a comment in the AUR package space.  I've also done some more reading after a night sleep and think that the Makefile needs to have -I/usr/include/drumstick added to CPPFLAGS.  Next step is to try to figure out AUR / cmake enough to know where to put this.  I might also try to export said variable from bash as a workaround.

Offline

#5 2014-09-18 05:27:56

mek42
Member
Registered: 2014-09-14
Posts: 15

Re: [SOLVED] which bash environment variable for path to C++ header file?

I was able to get the package installed by using makepkg in a local copy followed by manually changing <*.h> to "/usr/include/drumstick" for all *.h provided by drumstick and then using make all as needed.  I'll add this note to the AUR comment space.

Last edited by mek42 (2014-09-18 05:29:33)

Offline

#6 2014-10-11 16:57:06

4javier
Member
From: Italia
Registered: 2010-12-01
Posts: 115

Re: [SOLVED] which bash environment variable for path to C++ header file?

I have been able to build with this modified PKGBUILD (sed manipulation added) for an italian forum user

    pkgname=kmid2
    pkgver=2.4.0
    pkgrel=1
    pkgdesc="MIDI/Karaoke player for KDE4"
    url="http://userbase.kde.org/KMid2"
    license="GPL"
    arch=('i686' 'x86_64')
    depends=('kdelibs' 'alsa-lib' 'phonon' 'drumstick')
    makedepends=('cmake' 'automoc4')
    optdepends=('timidity++')
    conflicts=('kmid-svn')
    source=(http://downloads.sourceforge.net/${pkgname}/${pkgver}/kmid-${pkgver}.tar.bz2)
    md5sums=('3abf39fdb31862d4d695613e8835bf00')

    build() {
         cd ${srcdir}/kmid-$pkgver
         sed -i 's/${DRUMSTICK-ALSA_INCLUDEDIR}/"\/usr\/include\/drumstick"/' CMakeLists.txt
         cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release

         make
         make DESTDIR=${pkgdir} install
       }

but it crashes on start

LANG=en_EN.UTF-8 kmid
kmid(19558)/kdeui (KIconLoader): Error: standard icon theme "oxygen" not found! 

Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QString)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QString)
kmid(19558)/kdeui (kdelibs): Attempt to use QAction "show_volume_pitch" with KXMLGUIFactory! 
kmid(19558)/kdeui (kdelibs): Attempt to use QAction "show_position" with KXMLGUIFactory! 
kmid(19558)/kdeui (kdelibs): Attempt to use QAction "show_codecs" with KXMLGUIFactory! 
kmid(19558)/kdeui (kdelibs): Attempt to use QAction "show_rhythm" with KXMLGUIFactory! 
Object::connect: No such signal ????::signalSMFHeader(int,int,int)
Object::connect: No such signal ????::signalSMFNoteOn(int,int,int)
Object::connect: No such signal ????::signalSMFNoteOff(int,int,int)
Object::connect: No such signal ????::signalSMFKeyPress(int,int,int)
Object::connect: No such signal ????::signalSMFCtlChange(int,int,int)
Object::connect: No such signal ????::signalSMFPitchBend(int,int)
Object::connect: No such signal ????::signalSMFProgram(int,int)
Object::connect: No such signal ????::signalSMFChanPress(int,int)
Object::connect: No such signal ????::signalSMFSysex(const QByteArray&)
Object::connect: No such signal ????::signalSMFMetaMisc(int,const QByteArray&)
Object::connect: No such signal ????::signalSMFTempo(int)
Object::connect: No such signal ????::signalSMFTrackStart()
Object::connect: No such signal ????::signalSMFTrackEnd()
Object::connect: No such signal ????::signalSMFendOfTrack()
Object::connect: No such signal ????::signalSMFError(const QString&)
Object::connect: No such signal ????::signalSMFTimeSig(int,int,int,int)
KCrash: Application 'kmid' crashing...
KCrash: Attempting to start  from kdeinit
sock_file=/home/javier/.kde4/socket-archbox/kdeinit4__0
KCrash: Attempting to start  directly
KCrash failed to exec(), errno = 2

I hvea not a complete KDE environment, just needed dependencies. On the user KDE system there's tha same issue, and it seems to be solvable only downgrading drumstick to 0.5-2. Kmid seems to be a dead project, I don't know if anybody will ever update it to be compatible with drumstick 1.0.

Offline

Board footer

Powered by FluxBB