You are not logged in.

#1 2012-05-03 07:01:00

jiewmeng
Member
Registered: 2012-02-09
Posts: 118

Problem install hal

I am having problems installing hal from the AUR. I am getting errors like

/usr/include/glib-2.0/glib/gtypes.h:28:2: error: #error "Only <glib.h> can be included directly."
In file included from /usr/include/glib-2.0/glib/gmain.h:29:0,
                 from addon-generic-backlight.c:38:
/usr/include/glib-2.0/glib/gthread.h:28:2: error: #error "Only <glib.h> can be included directly."
In file included from /usr/include/glib-2.0/glib/gthread.h:34:0,
                 from /usr/include/glib-2.0/glib/gmain.h:29,
                 from addon-generic-backlight.c:38:
/usr/include/glib-2.0/glib/gatomic.h:23:2: error: #error "Only <glib.h> can be included directly."
In file included from /usr/include/glib-2.0/glib/gatomic.h:29:0,
                 from /usr/include/glib-2.0/glib/gthread.h:34,
                 from /usr/include/glib-2.0/glib/gmain.h:29,
                 from addon-generic-backlight.c:38:
/usr/include/glib-2.0/glib/gtypes.h:28:2: error: #error "Only <glib.h> can be included directly."
In file included from /usr/include/glib-2.0/glib/gthread.h:35:0,
                 from /usr/include/glib-2.0/glib/gmain.h:29,
                 from addon-generic-backlight.c:38:
/usr/include/glib-2.0/glib/gerror.h:22:2: error: #error "Only <glib.h> can be included directly."
In file included from /usr/include/glib-2.0/glib/gerror.h:30:0,
                 from /usr/include/glib-2.0/glib/gthread.h:35,
                 from /usr/include/glib-2.0/glib/gmain.h:29,
                 from addon-generic-backlight.c:38:
/usr/include/glib-2.0/glib/gquark.h:28:2: error: #error "Only <glib.h> can be included directly."
In file included from /usr/include/glib-2.0/glib/gquark.h:34:0,
                 from /usr/include/glib-2.0/glib/gerror.h:30,
                 from /usr/include/glib-2.0/glib/gthread.h:35,
                 from /usr/include/glib-2.0/glib/gmain.h:29,
                 from addon-generic-backlight.c:38:
/usr/include/glib-2.0/glib/gtypes.h:28:2: error: #error "Only <glib.h> can be included directly."
make[5]: *** [addon-generic-backlight.o] Error 1

I understand this is an known issue and tried the workaround

I saw this problem earlier elsewhere, so I knew that I have to replace some includes to <glib.h>.
I went to the indicated directory and started fixing these problems.
E.g. in
/tmp/yaourt-tmp-archie/aur-hal/src/hal-0.5.14/hald/linux/addons/addon-generic-backlight.c
I replaced (line 38 as indicated above)
#include <glib/gmain.h>
to
#include <glib.h>

You get the idea. Sometimes <glib.h> was already included so I just needed to comment out (or delete) the additional glib includes.
Then you can run make in the directory which other files need changes. I needed to change these files:

addon-generic-backlight.c
addon-input.c
addon-ipw-killswitch.c
addon-leds.c
addon-rfkill-killswitch.c
addon-storage.c
addon-imac-backlight.c
addon-macbookpro-backlight.c
addon-usb-csr.c

Verify that make can run successfully in this directory. IMPORTANT: then create a copy of the .c files in this directory to some completely different directory (e.g. I copied them to /tmp/addons). This is needed, because when we restart the build in yaourt, these files will be overwritten. Maybe you could just move the whole directory or something like that.
Now it's time to restart the build in yaourt. You will get to a point when there are a lot of "checking <...>" lines. Press Ctrl Z now to stop this process.
Then restore the backed up .c files to the /tmp/yaourt-tmp-archie/aur-hal/src/hal-0.5.14/hald/linux/addons or similar dir (depends on your username).
Execute the fg program to resume the yaourt process. Now, with the patched source files hal should build normally and you are able to install hal.

I suppose yaourt is an AUR helper, I am using aurget, anyways, I edited the files to point to glib.h instead and run `makepkg -fsi`, but I still get similar errors, and it appears the errors originate from `/usr/include/...`? My AUR files are in /home/jiewmeng/hal/... is hal partially installed? I did use the force flag so it should overwrite old files?


Computer Science Student, Web Developer

Offline

#2 2012-05-03 07:17:56

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Problem install hal

Why do you want HAL? It is deprecated and the AUR package is out of date as well.

Offline

#3 2012-05-03 07:20:12

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Problem install hal

Purely out of curiousity, why do you need HAL exactly?

EDIT: too slow. What swanson said basically.

Last edited by Gcool (2012-05-03 07:20:36)


Burninate!

Offline

#4 2012-05-03 08:08:26

jiewmeng
Member
Registered: 2012-02-09
Posts: 118

Re: Problem install hal

I am installing other packages from the AUR and it appears to need HAL.

aurget -S --deps --noedit lightdm lightdm-gtk-greeter thunar-shares-plugin gnome-do titanium-studio sublime-text retext qtoctave ttf-google-webfonts nodejs-npm xfce-theme-greybird faenza-icon-theme dockmanager docky xfwm4-tiling ttf-computer-modern-fonts

I am guessing its probably `thunar-shares-plugin`


Computer Science Student, Web Developer

Offline

#5 2012-05-03 08:43:13

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: Problem install hal

Thunar 1.2.x and up does not need hal. it needs gvfs so that plugin is old too.

Offline

#6 2012-05-03 13:18:39

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: Problem install hal

Yeah, avoid hal it is extremely buggy, avoid it as it is no longer needed y anything new.

Offline

Board footer

Powered by FluxBB