Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#16139 closed defect (fixed)

erlang R12B-3 fails to build when unixODBC is present

Reported by: dbevans (David B. Evans) Owned by: bfulgham@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: odbc Cc:
Port: erlang

Description

while attempting to upgrade erlang R12B-3 on Tiger (10.4.11 ppc) build failed with following error

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_macports_trunk_dports_lang_erlang/work/erlang-R12B-3" && make all " returned error 2
Command output: odbcserver.c:1527: warning: pointer targets in passing argument 1 of 'ei_decode_double' differ in signedness
odbcserver.c:1534: warning: pointer targets in passing argument 1 of 'ei_decode_boolean' differ in signedness
odbcserver.c: In function 'init_param_column':
odbcserver.c:1967: warning: pointer targets in passing argument 1 of 'ei_decode_long' differ in signedness
odbcserver.c:2005: warning: pointer targets in passing argument 1 of 'ei_decode_long' differ in signedness
odbcserver.c:2006: warning: pointer targets in passing argument 1 of 'ei_decode_long' differ in signedness
odbcserver.c:2029: warning: pointer targets in passing argument 1 of 'ei_decode_long' differ in signedness
odbcserver.c:2045: warning: pointer targets in passing argument 1 of 'ei_decode_long' differ in signedness
odbcserver.c:2077: warning: pointer targets in passing argument 1 of 'ei_decode_long' differ in signedness
odbcserver.c: In function 'bind_parameter_arrays':
odbcserver.c:2246: warning: pointer targets in passing argument 1 of 'ei_get_type' differ in signedness
odbcserver.c:2250: warning: pointer targets in passing argument 1 of 'ei_decode_list_header' differ in signedness
odbcserver.c:2253: warning: pointer targets in passing argument 1 of 'ei_decode_tuple_header' differ in signedness
odbcserver.c:2257: warning: pointer targets in passing argument 1 of 'ei_decode_list_header' differ in signedness
odbcserver.c:2264: warning: pointer targets in passing argument 1 of 'ei_decode_long' differ in signedness
odbcserver.c: In function 'retrive_scrollable_cursor_support_info':
odbcserver.c:2392: warning: pointer targets in assignment differ in signedness
odbcserver.c: In function 'more_result_sets':
odbcserver.c:2423: warning: pointer targets in passing argument 1 of 'encode_error_message' differ in signedness
/usr/bin/gcc-4.0  -O2 -o ../priv/bin/powerpc-apple-darwin8.11.0/odbcserver ../priv/obj/powerpc-apple-darwin8.11.0/odbcserver.o -L/usr/lib -lodbc -L/opt/local/var/macports/build/_opt_macports_trunk_dports_lang_erlang/work/erlang-R12B-3/lib/erl_interface/obj/powerpc-apple-darwin8.11.0 -lpthread -lerl_interface -lei
/usr/bin/ld: Undefined symbols:
_SQLGetConfigMode
_SQLGetPrivateProfileString
_SQLSetConfigMode
collect2: ld returned 1 exit status

Appears to be configuration error: -L/usr/lib -lodbc in failing command should be -L${prefix}/lib -lodbc. In addition, portfile is missing a dependency on a provider of libodbc (unixODBC?).

Change History (7)

comment:1 Changed 16 years ago by dbevans (David B. Evans)

More information:

This error only occurs when port unixODBC IS present. The problem is due to the way that erlang's test for ODBC support in configure works. The summary for this ticket should changed to

erlang R12B-3 fails to build when unixODBC is present

Configure checks for sql.h in a number of "standard" places (which does NOT include ${prefix}. It finds sql.h (provided by iodbc that comes with darwin) in /usr/include and decides that odbc is installed in prefix /usr

Configure then checks for libodbc to confirm but uses the ${prefix} install prefix this time and finds libodbc (provided by unixODBC) in ${prefix}/lib. It concludes that ODBC support is present (true) but uses the install path from the sql.h check (/usr) as the location for libodbc (false).

As a result, configure turns on ODBC support but inserts

-L /usr/lib -lodbc

in the link command which fails because there is no libodbc at /usr/lib (only libiodbc).

There are at least two ways to fix this.

Patch configure to look for libiodbc on darwin platforms in which case the correct flags are

-L/usr/lib  -liodbc -liodbcinst

(as provided by iodbc-config) but this mixes /usr prefixes with ${prefix} prefixes which may cause problems?

or

Patch configure to add ${prefix} to the list of paths that it searches for sql.h so that it will find the correct install path for unixODBC or other MacPorts ODBC provider in which case the flags

-L${prefix}/lib -lodbc

should be generated.

or both (with MacPorts libodbc overriding libiodbc if present)

I'm willing to take a crack at a patch for this but would welcome any input or suggestions on approach from the principal maintainer (or anyone else for that matter).

comment:2 Changed 16 years ago by dbevans (David B. Evans)

Just to be clear, the configure file where all this goes on is

lib/odbc/configure

comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: erlang R12B-3 fails to build on upgradeerlang R12B-3 fails to build when unixODBC is present

comment:4 Changed 16 years ago by mf2k (Frank Schima)

Cc: bfulgham@… removed
Keywords: erlang removed
Owner: changed from macports-tickets@… to bfulgham@…
Port: erlang added

comment:5 in reply to:  description Changed 16 years ago by dbevans (David B. Evans)

Replying to db.evans@…:

while attempting to upgrade erlang R12B-3 on Tiger (10.4.11 ppc) build failed with following error

This issue has been fixed in R12B-4. The ticket can be closed.

comment:6 Changed 16 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

comment:7 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.