All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/erlang: add optional dependency to unixodbc
@ 2016-10-23 15:34 Bernd Kuhls
  2016-10-24 15:38 ` Frank Hunleth
  2016-10-25 20:58 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2016-10-23 15:34 UTC (permalink / raw)
  To: buildroot

Quote from erlang configure without unixodbc:

checking for odbc in standard locations... no
configure: WARNING: No odbc library found skipping odbc
configure: WARNING: "ODBC library - header check failed"
configure: WARNING: "ODBC library - link check failed"

Quote from erlang configure with unixodbc:

checking for odbc in standard locations... -L/home/buildroot/br3_couchdb/output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/lib
checking for SQLAllocHandle in -lodbc... yes

To check for unixodbc support used by erlang use readelf:

$ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/erlang/lib/odbc-2.11.1/priv/bin/odbcserver | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libodbc.so.2]
 0x00000001 (NEEDED)                     Shared library: [libc.so.0]

Tested using this minimal defconfig:

BR2_PACKAGE_ERLANG=y
BR2_PACKAGE_ERLANG_SMP=y
BR2_PACKAGE_UNIXODBC=y

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/erlang/erlang.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk
index 6efffde..c9d7b22 100644
--- a/package/erlang/erlang.mk
+++ b/package/erlang/erlang.mk
@@ -55,6 +55,10 @@ else
 ERLANG_CONF_OPTS += --without-ssl
 endif
 
+ifeq ($(BR2_PACKAGE_UNIXODBC),y)
+ERLANG_DEPENDENCIES += unixodbc
+endif
+
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 ERLANG_CONF_OPTS += --enable-shared-zlib
 ERLANG_DEPENDENCIES += zlib
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/erlang: add optional dependency to unixodbc
  2016-10-23 15:34 [Buildroot] [PATCH 1/1] package/erlang: add optional dependency to unixodbc Bernd Kuhls
@ 2016-10-24 15:38 ` Frank Hunleth
  2016-10-25 20:58 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Hunleth @ 2016-10-24 15:38 UTC (permalink / raw)
  To: buildroot

On Sun, Oct 23, 2016 at 11:34 AM, Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
> Quote from erlang configure without unixodbc:
>
> checking for odbc in standard locations... no
> configure: WARNING: No odbc library found skipping odbc
> configure: WARNING: "ODBC library - header check failed"
> configure: WARNING: "ODBC library - link check failed"
>
> Quote from erlang configure with unixodbc:
>
> checking for odbc in standard locations... -L/home/buildroot/br3_couchdb/output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/lib
> checking for SQLAllocHandle in -lodbc... yes
>
> To check for unixodbc support used by erlang use readelf:
>
> $ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/erlang/lib/odbc-2.11.1/priv/bin/odbcserver | grep NEEDED
>  0x00000001 (NEEDED)                     Shared library: [libodbc.so.2]
>  0x00000001 (NEEDED)                     Shared library: [libc.so.0]
>
> Tested using this minimal defconfig:
>
> BR2_PACKAGE_ERLANG=y
> BR2_PACKAGE_ERLANG_SMP=y
> BR2_PACKAGE_UNIXODBC=y
>

Looks good to me. I tried it out by running Erlang, starting the odbc
application and running a couple functions against it to see that it
would call into the library fine. I didn't connect to a database, but
I could tell that it was interacting with the unixodbc library based
on the error messages. If something changes and you need to test it
again, I think this is sufficient:

# erl
Eshell V7.3  (abort with ^G)
1> odbc:start().
ok
2> odbc:connect("DSN=sql-server;UID=aladdin;PWD=sesame", []).
{error,"[unixODBC][Driver Manager]Data source name not found, and no
default driver specified SQLSTATE IS: IM002 Connection to database
failed."}

Tested-by: Frank Hunleth <fhunleth@troodon-software.com>

> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/erlang/erlang.mk | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk
> index 6efffde..c9d7b22 100644
> --- a/package/erlang/erlang.mk
> +++ b/package/erlang/erlang.mk
> @@ -55,6 +55,10 @@ else
>  ERLANG_CONF_OPTS += --without-ssl
>  endif
>
> +ifeq ($(BR2_PACKAGE_UNIXODBC),y)
> +ERLANG_DEPENDENCIES += unixodbc
> +endif
> +
>  ifeq ($(BR2_PACKAGE_ZLIB),y)
>  ERLANG_CONF_OPTS += --enable-shared-zlib
>  ERLANG_DEPENDENCIES += zlib
> --
> 2.9.3
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 
Frank Hunleth
Troodon Software LLC
Embedded Software Development
http://troodon-software.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/erlang: add optional dependency to unixodbc
  2016-10-23 15:34 [Buildroot] [PATCH 1/1] package/erlang: add optional dependency to unixodbc Bernd Kuhls
  2016-10-24 15:38 ` Frank Hunleth
@ 2016-10-25 20:58 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2016-10-25 20:58 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 23 Oct 2016 17:34:03 +0200, Bernd Kuhls wrote:
> Quote from erlang configure without unixodbc:
> 
> checking for odbc in standard locations... no
> configure: WARNING: No odbc library found skipping odbc
> configure: WARNING: "ODBC library - header check failed"
> configure: WARNING: "ODBC library - link check failed"
> 
> Quote from erlang configure with unixodbc:
> 
> checking for odbc in standard locations... -L/home/buildroot/br3_couchdb/output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/lib
> checking for SQLAllocHandle in -lodbc... yes
> 
> To check for unixodbc support used by erlang use readelf:
> 
> $ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/erlang/lib/odbc-2.11.1/priv/bin/odbcserver | grep NEEDED
>  0x00000001 (NEEDED)                     Shared library: [libodbc.so.2]
>  0x00000001 (NEEDED)                     Shared library: [libc.so.0]
> 
> Tested using this minimal defconfig:
> 
> BR2_PACKAGE_ERLANG=y
> BR2_PACKAGE_ERLANG_SMP=y
> BR2_PACKAGE_UNIXODBC=y
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/erlang/erlang.mk | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to master, thanks. Thanks a lot Frank for the Tested-by!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-25 20:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-23 15:34 [Buildroot] [PATCH 1/1] package/erlang: add optional dependency to unixodbc Bernd Kuhls
2016-10-24 15:38 ` Frank Hunleth
2016-10-25 20:58 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.