compiling HAL form source (needed for Amazon Instant Video)

Hello !

I’m trying to compile HAL from source, as apparently it isn’t packed in the repos, in order to have the Amazon Instant video work in my Suse box. Apparently it is needed for the “correct playback of DRM protected content through flash” (When are we going to finally get rid of that aberration)

I can install HAL-info without problems, but with HAL, I get the following error.


suser@linux-59h5:/opt/hal> sudo ./autogen.sh
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.

configure.in:1052: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.in:1052: the top level
configure.in:1052: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.in:1052: the top level
configure.in:1052: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.in:1052: the top level
configure.in:37: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

I use sudo because I’m working in /opt.
I have all the dependencies installed, according to: freedesktop.org - Software/hal I didn’t have glib, but I have glibc. Not an exact match but I believe it is the same library.

Can you guys please offer some advice ?

Thanks !!

PS: I installed the HAL version provided in the KDE3 repo and it didn’t work. Amazon Instant Video, that is.

You can get it from OBS
http://software.opensuse.org/package/hal


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

On 2012-11-02 13:36, Hanzdersion wrote:
>
> Hello !
>
> I’m trying to compile HAL from source, as apparently it isn’t packed
> in the repos,

But it is. KDE3 uses it, IIRC


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Never build/compile any software as root.

I didn’t have glib, but I have glibc. Not an exact match but I believe it is the same library.

That is completely different library.

Apparently it is needed for the “correct playback of DRM protected content through flash

I remember that long ago some programs (not sure whether it was Flash or Acroread) indeed had dependencies on HAL. But I cannot imagine what HAL has to do with DRM. Right now I am using flash player in 12.2 without HAL installed.

On 2012-11-02 14:06, arvidjaar wrote:

> I remember that long ago some programs (not sure whether it was Flash
> or Acroread) indeed had dependencies on HAL. But I cannot imagine what
> HAL has to do with DRM.

I have seen it before.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Am 02.11.2012 14:06, schrieb arvidjaar:
> But I cannot imagine what
> HAL has to do with DRM.
It uses hal to get an hardware identifier for the machine.
That you use flash without hal does simply mean you do not use flash for
DRM protected media.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

Thanks for the link.
I had already tried installing the package from the KDE3 repo, without success. This time I installed the package from the “vodoo” repo and the result was the same; the installation goes fine but when trying to play a video, the plugin crashes. This happened in firefox and opera. I tried uninstallling/reinstalling the flash plugin both through zypper and manually. Same result.
After finding this: https://bbs.archlinux.org/viewtopic.php?id=133626 and browsing through my list of running processes, not finding HAL, I’m convinced the crashes are occurring because HAL is not running.

How can I start HAL, if it is not in /etc/rc.d ??

Thank you.

PS: using “find” I found a binary called “hald” in /usr/sbin/ however running it doesn’t seem to work either.

It is rather vague. HAL does not start? It starts but your application does not work? HAL is started by running hald, but to access it one needs additional D-Bus configuration, this could be your problem.

hald(8): HAL daemon - Linux man page Try running it with --daemon=no --verbose; this will at least show whether it starts. Then it is possible to investigate further.

yast -> system -> runlevel -> haldaemon and start it.
or from the command line


su -
insserv haldaemon #to enable automatic start on boot
rchal start #to start it now
rchal status #to check if it is running


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

OK guys, thanks for your prompt help. Hers what I got:

after running “rchal start”:


linux-59h5:/ # rchal status
redirecting to systemctl
haldaemon.service - LSB: HAL is a daemon for managing information about the hardware on the system
          Loaded: loaded (/etc/init.d/haldaemon)
          Active: active (exited) since Sun, 04 Nov 2012 12:20:44 -0500; 8s ago
         Process: 5218 ExecStart=/etc/init.d/haldaemon start (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/haldaemon.service

Process 5218 doesn’t show up. Kill 5218 confirms process 5218 doesn’t exist.

after running “hald --daemon=no --verbose=yes” I get:


hald --daemon=no --verbose=yes
12:28:26.276 * hald.c:673: hal 0.5.14
12:28:26.276 * hald.c:674: using child timeout 250s
12:28:26.276 * hald.c:739: Will not daemonize
12:28:26.276 * hald_dbus.c:5444: local server is listening at unix:abstract=/var/run/hald/dbus-UwBpFLGIDt,guid=523ed775f998adf58872231b00004507
12:28:26.278 * ck-tracker.c:396: got seat '/org/freedesktop/ConsoleKit/Seat1'
12:28:26.278 * ck-tracker.c:323: got session '/org/freedesktop/ConsoleKit/Session1' for seat '/org/freedesktop/ConsoleKit/Seat1'
12:28:26.280 * ck-tracker.c:274: Got active state (ACTIVE) and uid 1000 on session '/org/freedesktop/ConsoleKit/Session1'
12:28:26.280 * ck-tracker.c:344: Got all sessions on seat '/org/freedesktop/ConsoleKit/Seat1'
12:28:26.280 * ck-tracker.c:423: Got seats
12:28:26.280 * ck-tracker.c:824: Got seats and sessions
12:28:26.280 * hald_runner.c:304: Runner has pid 5402
Runner started - allowed paths are '/usr/lib/hal:/usr/lib/hal/scripts:/usr/bin'
12:28:26.281 * hald_runner.c:184: runner connection is 0x1b0fe10

** (process:5401): WARNING **: Failed to add monitor on '/etc/hal/fdi/preprobe': No such file or directory

** (process:5401): WARNING **: Failed to add monitor on '/etc/hal/fdi/information': No such file or directory

** (process:5401): WARNING **: Failed to add monitor on '/etc/hal/fdi/policy': No such file or directory
12:28:26.283 * mmap_cache.c:126: Regenerating fdi cache..
Run started hald-generate-fdi-cache (60000) (0) 
!  full path is '/usr/lib/hal/hald-generate-fdi-cache', program_dir is '/usr/lib/hal'
12:28:26.285 [E] create_cache.c:551: Cannot scan '/etc/hal/fdi/preprobe': No such file or directory
12:28:26.285 [E] create_cache.c:709: Error generating fdi cache
pid 5404: rc=1 signaled=0: /usr/lib/hal/hald-generate-fdi-cache
12:28:26.285 * mmap_cache.c:104: In regen_cache_cb exit_type=0, return_code=1
12:28:26.285 [E] mmap_cache.c:153: fdi cache regeneration failed!
12:28:26.285 * mmap_cache.c:156: fdi cache generation done
12:28:26.285 * mmap_cache.c:278: cache mtime is 1352035697
*** [DIE] mmap_cache.c:di_rules_init():70 : Unable to open cache /var/cache/hald/fdi-cache

After which I verified and its not running either. I think** arvidjaar*****************](http://forums.opensuse.org/members/arvidjaar.html), you probably are correct. Hal might need additional configuration.

I Hope this logs prove more meaningful to you guys than they are for me.*

It does not need any configuration as it comes configured ready to be used.
What version of openSUSE do you have?


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

Am 04.11.2012 18:56, schrieb Hanzdersion:
> *** [DIE] mmap_cache.c:di_rules_init():70 : Unable to open cache /var/cache/hald/fdi-cache

Do you run as normal user? A normal user will not have access to this.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

It’s on my signature. OpenSuse 12.2 x64
No, I ran the command as root. Running hald as a a regular user will produce this output.

Absolute path to 'hald' is '/usr/sbin/hald', so running it may require superuser privileges (eg. root).

running it with sudo returns:

sudo: hald: command not found

Honestly no clue what is wrong on your system or where to start
debugging it. It works here as it should and it worked the same when I
was on 12.1 with flash + drm.

The output you show for a normal user is what you get when /usr/sbin is
not in your path, it is the path on my system and gives as normal user
almost the output you’ve got, I checked that.


PC: oS 12.2 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.5 | GeForce GT 420
ThinkPad E320: oS 12.2 x86_64 | i3@2.30GHz | 8GB | KDE 4.9.2 | HD 3000
eCAFE 800: oS 11.4 i586 | AMD Geode LX 800@500MHz | 512MB | lamp server

On 2012-11-04 19:46, Hanzdersion wrote:
> No, I ran the command as root

Did you use “su” or “su -”?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

So use full path /usr/sbin/hald or wherever it is located.

So use full path /usr/sbin/hald or wherever it is located.

I just tried. I got pretty much the exact same log I get when running as su.


suser@linux-59h5:~> sudo /usr/sbin/hald --daemon=no --verbose=yes
09:45:05.300 * hald.c:673: hal 0.5.14
09:45:05.300 * hald.c:674: using child timeout 250s
09:45:05.300 * hald.c:739: Will not daemonize
09:45:05.300 * hald_dbus.c:5444: local server is listening at unix:abstract=/var/run/hald/dbus-bFRAQk9F85,guid=f90808f98f7533a9b98d6a3a0000027a
09:45:05.301 * ck-tracker.c:396: got seat '/org/freedesktop/ConsoleKit/Seat1'
09:45:05.301 * ck-tracker.c:323: got session '/org/freedesktop/ConsoleKit/Session1' for seat '/org/freedesktop/ConsoleKit/Seat1'
09:45:05.302 * ck-tracker.c:274: Got active state (ACTIVE) and uid 1000 on session '/org/freedesktop/ConsoleKit/Session1'
09:45:05.302 * ck-tracker.c:344: Got all sessions on seat '/org/freedesktop/ConsoleKit/Seat1'
09:45:05.302 * ck-tracker.c:423: Got seats
09:45:05.302 * ck-tracker.c:824: Got seats and sessions
09:45:05.302 * hald_runner.c:304: Runner has pid 3266
Runner started - allowed paths are '/usr/lib/hal:/usr/lib/hal/scripts:/usr/bin'
09:45:05.303 * hald_runner.c:184: runner connection is 0x20a7d50

** (process:3264): WARNING **: Failed to add monitor on '/etc/hal/fdi/preprobe': No such file or directory

** (process:3264): WARNING **: Failed to add monitor on '/etc/hal/fdi/information': No such file or directory

** (process:3264): WARNING **: Failed to add monitor on '/etc/hal/fdi/policy': No such file or directory
09:45:05.304 * mmap_cache.c:126: Regenerating fdi cache..
Run started hald-generate-fdi-cache (60000) (0) 
!  full path is '/usr/lib/hal/hald-generate-fdi-cache', program_dir is '/usr/lib/hal'
09:45:05.306 [E] create_cache.c:551: Cannot scan '/etc/hal/fdi/preprobe': No such file or directory
09:45:05.306 [E] create_cache.c:709: Error generating fdi cache
pid 3268: rc=1 signaled=0: /usr/lib/hal/hald-generate-fdi-cache
09:45:05.306 * mmap_cache.c:104: In regen_cache_cb exit_type=0, return_code=1
09:45:05.306 [E] mmap_cache.c:153: fdi cache regeneration failed!
09:45:05.306 * mmap_cache.c:156: fdi cache generation done
09:45:05.306 * mmap_cache.c:278: cache mtime is 1352035697
*** [DIE] mmap_cache.c:di_rules_init():70 : Unable to open cache /var/cache/hald/fdi-cache

I believe * stands for information [E] stands for error and [D] for ???*****************

On 2012-11-05 15:56, Hanzdersion wrote:
>
>> So use full path /usr/sbin/hald or wherever it is located.
> I just tried. I got pretty much the exact same log I get when running
> as su.

I repeat: “su” or “su -”?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Does /var/cache/hald/fdi-cache exist? Does /var/cache/hald exist?

I apologize…
To answer your question both. And I get the same logs with either one.

It does exist, though it is empty. The interesting part is this:


 ls -l
total 48
drwxrwxr-x  3 root      lp        4096 Nov  5 10:58 cups
drwxr-xr-x  2 root      root      4096 Sep 29 02:48 fontconfig
drwxr-xr-x  2 root      root      4096 Sep 14 09:01 gio-2.0
drwxr-xr-x  2 **haldaemon haldaemon** 4096 Nov  5 11:02 hald

I’m gonna try making my user a member of the haldaemon group and see what happens.