LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Is it possible to install HAL on Slackware 14.1? (http://www.linuxquestions.org/questions/slackware-14/is-it-possible-to-install-hal-on-slackware-14-1-a-4175486435/)

xj25vm 12-01-2013 03:17 AM

Is it possible to install HAL on Slackware 14.1?
 
As per a number of threads on the Internet, including the following Ubuntu based article, Channel 4's 4od in UK and few other video content providers require HAL installed, otherwise they won't play.

http://www.omgubuntu.co.uk/2013/10/f...ed-flash-13-10

Out of all my Linux machines, only an older laptop with Slack 13.37 on it will play 4od.

I was wondering if there is a way of installing HAL on Slackware 14.1 64bit, ideally without interfering with any other packages or functionality of the machine. Has anybody else stumbled over this one, or managed to get it working?

TommyC7 12-01-2013 04:19 AM

You might be able to build hal using the 13.37 source (under l/). I don't know if it interferes with anything though. I recall it as removed because udev took over some of it's functionality.

ponce 12-01-2013 05:27 AM

if you want to build it with the 13.37 script, you will need this block before the "autoconf" line (I just tried it)
Code:

# this header moved
sed -i \
  "s|linux/videodev\.h|libv4l1-videodev.h|" \
  hald/linux/probing/probe-video4linux.c

# this is needed for the newer glib
sed -i \
  "s|\ <glib/.*\.h>$| <glib.h>|" \
  hald/hald_dbus.c \
  hald/linux/addons/addon-*.c \
  hald/linux/hal-file-monitor.c \
  tools/hal-storage-*.c

as if it interferes with something once installed I haven't tried it.

xj25vm 12-01-2013 06:24 AM

Thanks ponce. I just tried to build the 13.37 sources from a slackware mirror on a 14.1 64bit install - using your suggested code. I get the following error:

Code:

<snip/>
...
Making all in linux
make[4]: Entering directory `/tmp/hal-0.5.14/hald/linux'
Making all in probing
make[5]: Entering directory `/tmp/hal-0.5.14/hald/linux/probing'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/tmp/hal-0.5.14/hald/linux/probing'
Making all in addons
make[5]: Entering directory `/tmp/hal-0.5.14/hald/linux/addons'
  CCLD  hald-addon-generic-backlight
  CCLD  hald-addon-hid-ups
  CCLD  hald-addon-input
  CCLD  hald-addon-ipw-killswitch
  CCLD  hald-addon-leds
  CCLD  hald-addon-rfkill-killswitch
  CC    addon-storage.o
In file included from addon-storage.c:35:0:
/usr/include/scsi/sg.h:38:3: error: unknown type name ‘size_t’
  size_t iov_len;            /* Length in bytes  */
  ^
make[5]: *** [addon-storage.o] Error 1
make[5]: Leaving directory `/tmp/hal-0.5.14/hald/linux/addons'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/tmp/hal-0.5.14/hald/linux'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/hal-0.5.14/hald'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/hal-0.5.14/hald'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/hal-0.5.14'
make: *** [all] Error 2

Should I have installed hal-info first, or is it something else?

Bertman123 12-01-2013 07:19 AM

No need to compile from source. Just install hal and hal info from here.

http://mirrors.slackware.com/slackwa...slackware64/l/

ponce 12-01-2013 09:00 AM

Quote:

Originally Posted by xj25vm (Post 5073355)
Thanks ponce. I just tried to build the 13.37 sources from a slackware mirror on a 14.1 64bit install - using your suggested code. I get the following error:

Code:

/usr/include/scsi/sg.h:38:3: error: unknown type name ‘size_t’

size_t is defined in stdlib.h, located in the glibc package: I tried the above on a slackware full install.

xj25vm 12-01-2013 11:02 AM

@Bertman123 - thanks for that. Indeed, the 13.37 64bits packages installed without a problem. Initially Flash kept on crashing when attempting to play 4oD - but after rebooting the laptop, I'm happy to report that 4oD is finally playing on Linux. Fantastic not to have to keep on rebooting into Windows. Thanks again!

@ponce - Yes, you are right. I've checked /usr/include/stdlib.h - and it seems to include the definition for size_t. Yet the compilation was failing. Hmm.


I just hope that installing hal won't have any side effect on other pieces of software. So far very chuffed.

ponce 12-01-2013 11:10 AM

well, I tried on 32 bit and it failed with the same error as you, so I made a patch that simply invert the order of the interested includes and worked fine here: apply just before the above seds
Code:

diff -Naur hal-0.5.14.orig/hald/linux/addons/addon-storage.c hal-0.5.14/hald/linux/addons/addon-storage.c
--- hal-0.5.14.orig/hald/linux/addons/addon-storage.c  2009-08-24 14:42:30.000000000 +0200
+++ hal-0.5.14/hald/linux/addons/addon-storage.c        2013-12-01 18:05:09.753952239 +0100
@@ -32,10 +32,10 @@
 #include <linux/cdrom.h>
 #include <linux/fs.h>
 #include <mntent.h>
+#include <stdlib.h>
 #include <scsi/sg.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #include <sys/ioctl.h>
 #include <unistd.h>


TommyC7 12-01-2013 11:11 AM

Even though the package for 13.37 is available, the only reason I did not choose to say to use that package is because it was built for 13.37 and you're running 14.1 so I decided to take the safe bet and not mix packages from different Slackware versions.

Glad to hear the hal package worked out even for 14.1.

Bertman123 12-01-2013 11:24 AM

I haven't had a problem with the hal packages on 14.1. It helps me to be able to watch amazon prime videos. :-) I haven't noticed any problems with it.

xj25vm 12-01-2013 11:25 AM

Thanks ponce. I wonder if it would be a good idea to add HAL to SBo. It might be obsolete, but it also seems to be desperately needed for playing a number of online video sources.

ponce 12-01-2013 12:26 PM

it's unmaintained so I don't think it's a good idea.

and, IMHO, the above online video providers shouldn't use it.

xj25vm 12-01-2013 12:43 PM

Quote:

and, IMHO, the above online video providers shouldn't use it.
I couldn't agree more - but the reality of the matter is that they do use it - so it's a choice between installing HAL or using Windows. I'd rather do the former and enjoy Linux :-)

I was just thinking that others might end up in the same situation when trying to watch online videos - and if HAL was on SBo with the correct install scripts, it will save them the hassle of hunting around.

ponce 12-01-2013 02:22 PM

I think there will be no need to hunt around, as they have the choice to use the adjustments described in this topic and rebuild it theirselves or also avoid building it and use directly 13.37 packages (as you have tested ;) ).

jtsn 12-02-2013 04:01 AM

Quote:

Originally Posted by TommyC7 (Post 5073443)
Even though the package for 13.37 is available, the only reason I did not choose to say to use that package is because it was built for 13.37 and you're running 14.1 so I decided to take the safe bet and not mix packages from different Slackware versions.

Using the package from 13.37 is just fine. Slackware packages, which don't get an upgrade, are not rebuilt for new releases of the distribution anyway. So with the exception of Slackware64 13.0, every Slackware release is a "mix".


All times are GMT -5. The time now is 10:07 AM.