Solucionado problema de hal en FreeBSD 8

Luego de actualizar las fuentes de FreeBSD Current -aka FreeBSD 8- y los ports, hal no arrancaba, gran problema, debido a que mi mouse y teclado son USB, no podía usar X practicamente…, repito GRAN PROBLEMA (pese a que soy fanático de la consola… 😉 la cosa es que leyendo el UPDATING de /usr/src/, el nuevo STACK USB de FreeBSD viene incorporado en el sisteman (nice!) asi que libusb no era necesario (aquí el error), ya que los ports todavia no se “ajustan” a este cambio, pero la solución, es la siguiente;

Como dice;

20090309:
libusb20.so.1 is now installed as libusb.so.1 and the ports system
updated to use it. This requires a buildworld/installworld in order to
update the library and dependencies (usbconfig, etc). Its advisable to
rebuild all ports which uses libusb. More specific directions are given
in the ports collection UPDATING file. Any /etc/libmap.conf entries for
libusb are no longer required and can be removed.

Reina-Tonia / # uname -a
FreeBSD Reina-Tonia 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Wed Mar 11 13:58:25 CLST 2009 root@Reina-Tonia:/usr/obj/usr/src/sys/Segvfault i386
Reina-Tonia / # cd /usr/ports/sysutils/hal
Reina-Tonia hal #ls
Makefile distinfo files pkg-descr pkg-plist
Reina-Tonia hal # nano hal.diff

##### Asumo que, tanto como las fuentes y los ports, están actualizados #####

Seguimos los pasos que se señala en el /usr/ports/UPDATING;

FreeBSD libusb20 was renamed to libusb in r189585 and thus,
being fully compatible with libusb20, replaces devel/libusb
on HEAD. devel/libusb should not be used on these systems. Users
of libusb-dependent ports are advised to remove libusb package
from their systems, and rebuild all libusb dependencies. One
of possible ways to achive this is listed below:
# set tempfile=`mktemp /tmp/usbports.XX`
# pkg_info -qR /var/db/pkg/libusb-* > ${tempfile}
# pkg_delete -f /var/db/pkg/libusb-*
# cat ${tempfile} | xargs portupgrade -f
# rm -f ${tempfile}

Y seguimos ahora con el “arreglo”;

#### Con el siguiente contenido ####

diff -urBN hal.orig/Makefile hal/Makefile
— hal.orig/Makefile 2009-03-03 12:30:20.000000000 +0900
+++ hal/Makefile 2009-03-10 21:28:10.000000000 +0900
@@ -44,7 +44,7 @@
–with-deprecated-keys \
–localstatedir=/var
CONFIGURE_ENV= CPPFLAGS=”-I${LOCALBASE}/include -DHAVE_CK_0_3″ \
– LDFLAGS=”-L${LOCALBASE}/lib” \
+ LDFLAGS=”-L/usr/lib -L${LOCALBASE}/lib” \
GTKDOC=”false”

#HALVERSION= 0.5.10
diff -urBN hal.orig/files/patch-configure hal/files/patch-configure
— hal.orig/files/patch-configure 2009-02-24 06:44:23.000000000 +0900
+++ hal/files/patch-configure 2009-03-10 21:28:22.000000000 +0900
@@ -189,13 +189,13 @@

+if test “x$HALD_BACKEND” = “xfreebsd”; then
-+ { echo “$as_me:$LINENO: checking for libusb20_dev_get_info in -lusb20” >&5
-+echo $ECHO_N “checking for libusb20_dev_get_info in -lusb20… $ECHO_C” >&6; }
++ { echo “$as_me:$LINENO: checking for libusb20_dev_get_info in -lusb” >&5
++echo $ECHO_N “checking for libusb20_dev_get_info in -lusb… $ECHO_C” >&6; }
+if test “${ac_cv_lib_usb20_libusb20_dev_get_info+set}” = set; then
+ echo $ECHO_N “(cached) $ECHO_C” >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
-+LIBS=”-lusb20 $LIBS”
++LIBS=”-lusb $LIBS”
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
diff -urBN hal.orig/files/patch-configure.in hal/files/patch-configure.in
— hal.orig/files/patch-configure.in 2009-02-24 06:44:23.000000000 +0900
+++ hal/files/patch-configure.in 2009-03-10 21:16:31.000000000 +0900
@@ -13,11 +13,11 @@
AM_CONDITIONAL(HALD_COMPILE_SOLARIS, [test x$HALD_BACKEND = xsolaris], [Compiling for Solaris])
AC_SUBST(HALD_BACKEND)
+if test “x$HALD_BACKEND” = “xfreebsd”; then
-+ AC_CHECK_LIB([usb20], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no])
++ AC_CHECK_LIB([usb], [libusb20_dev_get_info], [USE_LIBUSB20=yes], [USE_LIBUSB20=no])
+fi
+AM_CONDITIONAL([HAVE_LIBUSB20],[test “x$USE_LIBUSB20” = “xyes”])
+if test “x$USE_LIBUSB20” = “xyes”; then
-+ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb20])
++ AC_DEFINE(HAVE_LIBUSB20, 1, [Set if we need libusb])
+fi
+

diff -urBN hal.orig/files/patch-hald_freebsd_Makefile.am hal/files/patch-hald_freebsd_Makefile.am
— hal.orig/files/patch-hald_freebsd_Makefile.am 2009-02-24 06:44:23.000000000 +0900
+++ hal/files/patch-hald_freebsd_Makefile.am 2009-03-10 21:31:25.000000000 +0900
@@ -8,7 +8,7 @@
+libhald_freebsd_la_SOURCES += \
+ hf-usb2.c \
+ hf-usb2.h
-+libhald_freebsd_la_LDFLAGS += -lusb20
++libhald_freebsd_la_LDFLAGS += -lusb
+endif
+
EXTRA_DIST = README TODO
diff -urBN hal.orig/files/patch-hald_freebsd_Makefile.in hal/files/patch-hald_freebsd_Makefile.in
— hal.orig/files/patch-hald_freebsd_Makefile.in 2009-02-24 06:44:23.000000000 +0900
+++ hal/files/patch-hald_freebsd_Makefile.in 2009-03-10 21:31:32.000000000 +0900
@@ -8,7 +8,7 @@
+@HAVE_LIBUSB20_TRUE@ hf-usb2.c \
+@HAVE_LIBUSB20_TRUE@ hf-usb2.h
+
-+@HAVE_LIBUSB20_TRUE@am__append_2 = -lusb20
++@HAVE_LIBUSB20_TRUE@am__append_2 = -lusb
subdir = hald/freebsd
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
diff -urBN hal.orig/files/patch-hald_freebsd_probing_Makefile.am hal/files/patch-hald_freebsd_probing_Makefile.am
— hal.orig/files/patch-hald_freebsd_probing_Makefile.am 2009-02-24 06:44:23.000000000 +0900
+++ hal/files/patch-hald_freebsd_probing_Makefile.am 2009-03-10 21:30:02.000000000 +0900
@@ -31,12 +31,12 @@
+hald_probe_usb2_device_SOURCES = probe-usb2-device.c
+hald_probe_usb2_device_LDADD = \
+ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
-+ -lusb20
++ -lusb
+
+hald_probe_usb2_interface_SOURCES = probe-usb2-interface.c
+hald_probe_usb2_interface_LDADD = \
+ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
-+ -lusb20
++ -lusb
+endif
+
+hald_probe_mouse_SOURCES = probe-mouse.c
diff -urBN hal.orig/files/patch-hald_freebsd_probing_Makefile.in hal/files/patch-hald_freebsd_probing_Makefile.in
— hal.orig/files/patch-hald_freebsd_probing_Makefile.in 2009-02-24 06:44:23.000000000 +0900
+++ hal/files/patch-hald_freebsd_probing_Makefile.in 2009-03-10 21:30:10.000000000 +0900
@@ -90,12 +90,12 @@
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_device_SOURCES = probe-usb2-device.c
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_device_LDADD = \
+@HAVE_LIBUSB20_TRUE@ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
-+@HAVE_LIBUSB20_TRUE@ -lusb20
++@HAVE_LIBUSB20_TRUE@ -lusb
+
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_interface_SOURCES = probe-usb2-interface.c
+@HAVE_LIBUSB20_TRUE@hald_probe_usb2_interface_LDADD = \
+@HAVE_LIBUSB20_TRUE@ $(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la \
-+@HAVE_LIBUSB20_TRUE@ -lusb20
++@HAVE_LIBUSB20_TRUE@ -lusb
+
+hald_probe_mouse_SOURCES = probe-mouse.c
+hald_probe_mouse_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@

Guardamos y cerramos. Aplicamos el parche;

Reina-Tonia hal # patch -p1 < hal.diff
Hmm… Looks like a unified diff to me…
The text leading up to this was:
————————–
|diff -urBN hal.orig/Makefile hal/Makefile
|— hal.orig/Makefile 2009-03-03 12:30:20.000000000 +0900
|+++ hal/Makefile 2009-03-10 21:28:10.000000000 +0900
————————–
Patching file Makefile using Plan A…
Hunk #1 succeeded at 44.
Hmm… The next patch looks like a unified diff to me…
The text leading up to this was:
————————–
|diff -urBN hal.orig/files/patch-configure hal/files/patch-configure
|— hal.orig/files/patch-configure 2009-02-24 06:44:23.000000000 +0900
|+++ hal/files/patch-configure 2009-03-10 21:28:22.000000000 +0900
————————–
Patching file files/patch-configure using Plan A…
Hunk #1 succeeded at 189.
Hmm… The next patch looks like a unified diff to me…
The text leading up to this was:
————————–
|diff -urBN hal.orig/files/patch-configure.in hal/files/patch-configure.in
|— hal.orig/files/patch-configure.in 2009-02-24 06:44:23.000000000 +0900
|+++ hal/files/patch-configure.in 2009-03-10 21:16:31.000000000 +0900
————————–
Patching file files/patch-configure.in using Plan A…
Hunk #1 succeeded at 13.
Hmm… The next patch looks like a unified diff to me…
The text leading up to this was:
————————–
|diff -urBN hal.orig/files/patch-hald_freebsd_Makefile.am hal/files/patch-hald_freebsd_Makefile.am
|— hal.orig/files/patch-hald_freebsd_Makefile.am 2009-02-24 06:44:23.000000000 +0900
|+++ hal/files/patch-hald_freebsd_Makefile.am 2009-03-10 21:31:25.000000000 +0900
————————–
Patching file files/patch-hald_freebsd_Makefile.am using Plan A…
Hunk #1 succeeded at 8.
Hmm… The next patch looks like a unified diff to me…
The text leading up to this was:
————————–
|diff -urBN hal.orig/files/patch-hald_freebsd_Makefile.in hal/files/patch-hald_freebsd_Makefile.in
|— hal.orig/files/patch-hald_freebsd_Makefile.in 2009-02-24 06:44:23.000000000 +0900
|+++ hal/files/patch-hald_freebsd_Makefile.in 2009-03-10 21:31:32.000000000 +0900
————————–
Patching file files/patch-hald_freebsd_Makefile.in using Plan A…
Hunk #1 succeeded at 8.
Hmm… The next patch looks like a unified diff to me…
The text leading up to this was:
————————–
|diff -urBN hal.orig/files/patch-hald_freebsd_probing_Makefile.am hal/files/patch-hald_freebsd_probing_Makefile.am
|— hal.orig/files/patch-hald_freebsd_probing_Makefile.am 2009-02-24 06:44:23.000000000 +0900
|+++ hal/files/patch-hald_freebsd_probing_Makefile.am 2009-03-10 21:30:02.000000000 +0900
————————–
Patching file files/patch-hald_freebsd_probing_Makefile.am using Plan A…
Hunk #1 succeeded at 31.
Hmm… The next patch looks like a unified diff to me…
The text leading up to this was:
————————–
|diff -urBN hal.orig/files/patch-hald_freebsd_probing_Makefile.in hal/files/patch-hald_freebsd_probing_Makefile.in
|— hal.orig/files/patch-hald_freebsd_probing_Makefile.in 2009-02-24 06:44:23.000000000 +0900
|+++ hal/files/patch-hald_freebsd_probing_Makefile.in 2009-03-10 21:30:10.000000000 +0900
————————–
Patching file files/patch-hald_freebsd_probing_Makefile.in using Plan A…
Hunk #1 succeeded at 90.
done
Reina-Tonia hal #

Recompilamos y listo 😉

Gracias a Daichi Goto por el parche.-

Anuncios
Explore posts in the same categories: FreeBSD, Problemas-Errores, Sistema, Tips

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s


A %d blogueros les gusta esto: