Opened on 01/13/05 at 11:11:27
Closed on 08/05/08 at 15:33:43
#741 closed defect (fixed)
Issue with linking autoconf generated tests when networking is enabled
Reported by: | kgardas | Owned by: | Eric Norum |
---|---|---|---|
Priority: | highest | Milestone: | 4.9 |
Component: | network/legacy | Version: | 4.6 |
Severity: | critical | Keywords: | |
Cc: | bugs@…, joel.sherrill@…, kgardas@… | Blocked By: | |
Blocking: |
Description
The problem is discussed in a thread starting here:
http://www.rtems.org/ml/rtems-users/2005/january/msg00102.html
Example: test for gethostname looks:
#include "confdefs.h"
/* System header to define stub macros and hopefully few prototypes,
which can conflict with char gethostname(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostname();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with and the normal name is an alias. */
#if defined (stub_gethostname)
choke me
#else
gethostname();
#endif
; return 0; }
and it is compiled with (those parameters are already hacked by me into
the configure):
configure:7258: i386-rtems-c++ -o conftest -O2
-B/mnt/karel/rtems-x86/i386-rtems/pc386lib -specs bsp_specs -qrtems
-B/mnt/karel/rtems-x86/i386-rtems/pc386/lib/ -Wl,-Ttext,0x00100000
/mnt/karel/rtems-x86/i386-rtems/pc386/lib/no-dpmem.rel
/mnt/karel/rtems-x86/i386-rtems/pc386/lib/no-msg.rel
/mnt/karel/rtems-x86/i386-rtems/pc386/lib/no-mp.rel
/mnt/karel/rtems-x86/i386-rtems/pc386/lib/no-part.rel
/mnt/karel/rtems-x86/i386-rtems/pc386/lib/no-signal.rel
/mnt/karel/rtems-x86/i386-rtems/pc386/lib/no-timer.rel
/mnt/karel/rtems-x86/i386-rtems/pc386/lib/no-rtmon.rel conftest.C -lm 1>&5
which results in undefined references:
/mnt/karel/rtems-x86/i386-rtems/pc386lib/librtemscpu.a(rtems_glue.o): In
function `rtems_bsdnet_initialize_network':
/mnt/karel/downloads/RTEMS/build/tools/obj-rtems/i386-rtems/c/pc386/exec/libnetworking/../../../../../../rtems/cpukit/libnetworking/r
tems/rtems_glue.c:944: undefined reference to `rtems_bsdnet_config'
/mnt/karel/downloads/RTEMS/build/tools/obj-rtems/i386-rtems/c/pc386/exec/libnetworking/../../../../../../rtems/cpukit/libnetworking/r
tems/rtems_glue.c:953: undefined reference to `rtems_bsdnet_config'
/mnt/karel/rtems-x86/i386-rtems/pc386lib/librtemscpu.a(rtems_glue.o): In
function `rtems_bsdnet_initialize':
/mnt/karel/downloads/RTEMS/build/tools/obj-rtems/i386-rtems/c/pc386/exec/libnetworking/../../../../../../rtems/cpukit/libnetworking/r
tems/rtems_glue.c:226: undefined reference to `rtems_bsdnet_config'
/mnt/karel/downloads/RTEMS/build/tools/obj-rtems/i386-rtems/c/pc386/exec/libnetworking/../../../../../../rtems/cpukit/libnetworking/r
tems/rtems_glue.c:234: undefined reference to `rtems_bsdnet_config'
/mnt/karel/downloads/RTEMS/build/tools/obj-rtems/i386-rtems/c/pc386/exec/libnetworking/../../../../../../rtems/cpukit/libnetworking/r
tems/rtems_glue.c:236: undefined reference to `rtems_bsdnet_config'
/mnt/karel/rtems-x86/i386-rtems/pc386lib/librtemscpu.a(rtems_glue.o):/mnt/karel/downloads/RTEMS/build/tools/obj-rtems/i386-rtems/c/
pc386/exec/libnetworking/../../../../../../rtems/cpukit/libnetworking/rtems/rtems_glue.c:813:
more undefined references to `rtems_bsdnet_config' follow
Release:
4.6.2
Environment:
pc386 BSP + 4.6.2 release recommended tools and their patches
Attachments (1)
Change History (3)
comment:1 Changed on 01/20/05 at 16:16:58 by Joel Sherrill
Status: | assigned → waiting |
---|
Changed on 08/05/08 at 15:32:04 by Joel Sherrill
Attachment: | pr741.diff added |
---|
comment:2 Changed on 08/05/08 at 15:33:43 by Joel Sherrill
Milestone: | → 4.9 |
---|---|
rep_platform: | → All |
Resolution: | → fixed |
Status: | assigned → closed |
Patch committed to all active branches.
Add Loopback Network Configuration