Modify

Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#8529 closed defect (fixed)

amule compile failed

Reported by: Christian Anke <carcinoma@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

in trunc i got this compile error:

Linking amuleweb
/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/usr/lib/libwx_baseu-2.8-i486-openwrt-linux.so: warning: the use of OBSOLESCENT `utime' is discouraged, use `utimes'
/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/usr/lib/libwx_baseu_net-2.8-i486-openwrt-linux.so: warning: gethostbyaddr_r is obsolescent, use getaddrinfo() instead.
/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/usr/lib/libwx_baseu_net-2.8-i486-openwrt-linux.so: warning: gethostbyname_r is obsolescent, use getnameinfo() instead.
/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/usr/lib/libwx_baseu-2.8-i486-openwrt-linux.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/usr/lib/libwx_baseu-2.8-i486-openwrt-linux.so: undefined reference to `iconv_open(char const*, char const*)'
/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/usr/lib/libwx_baseu-2.8-i486-openwrt-linux.so: undefined reference to `iconv_close(void*)'
/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/usr/lib/libwx_baseu-2.8-i486-openwrt-linux.so: undefined reference to `iconv(void*, char**, unsigned int*, char**, unsigned int*)'
collect2: ld returned 1 exit status
make[8]: *** [amuleweb] Error 1
make[7]: *** [all-recursive] Error 1
make[6]: *** [all-recursive] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/carcinoma/src/alix/fs/build_dir/target-i386_uClibc-0.9.31/aMule-2.2.6'
make[3]: *** [/home/carcinoma/src/alix/fs/build_dir/target-i386_uClibc-0.9.31/aMule-2.2.6/.built] Error 2
make[3]: Leaving directory `/home/carcinoma/src/alix/fs/feeds/packages/net/amule'
make[2]: *** [package/feeds/packages/amule/compile] Error 2
make[2]: Leaving directory `/home/carcinoma/src/alix/fs'
make[1]: *** [/home/carcinoma/src/alix/fs/staging_dir/target-i386_uClibc-0.9.31/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/carcinoma/src/alix/fs'
make: *** [world] Fehler 2

seems libwx has no clean reference to iconv

Attachments (0)

Change History (6)

comment:1 Changed 7 years ago by anonymous

Same problem here...

comment:2 Changed 7 years ago by anonymous

i have the same problem

comment:3 Changed 7 years ago by sasom

Hi,

anonymous #1 here again. I've been digging into this problem and found out the reason for invalid linkage. The problem lies in iconv.h header file: it's linkage specifiers are valid only for C programs, C++ programs will attempt to link against C++ "decorated" functions which aren't there. wxGTK library, which links to the wrong symbols in this particular case isn't the only one - I've enocountered a few others, but don't remember exactly which ones. The problem was the same.

In order to compile properly, you should modify iconv header in this location

package/feeds/packages/libiconv/src/include/iconv.h

to look like this:

/*
 * Very simple iconv api stub.
 */

#ifndef _ICONV_H
#define _ICONV_H 1

#define _LIBICONV_VERSION 0x010B    /* version number: (major<<8) + minor */

#include <stddef.h>

#ifdef __cplusplus // Added for proper C++ linkage
extern "C" {
#endif

extern  int _libiconv_version; /* Likewise */
typedef void *iconv_t;

extern iconv_t
iconv_open(const char *tocode, const char *fromcode);

extern size_t
iconv(iconv_t cd, char **inbuf, size_t *inbytesleft,
                  char **outbuf, size_t *outbytesleft);

extern int
iconv_close(iconv_t cd);

#ifdef __cplusplus
}
#endif

#endif /* _ICONV_H */

Rebuild wxGTK library and aMule should compile fine now. I'm not sure if this place is the most appropriate for this change. I've noticed m4 script in iconv subfolder (which should apparently do what I did by hand), but I have no experience with m4. I'm also new to OpenWrt, so I'll leave this contribution for now as it is and let others more experienced developers decide about the right approach for this problem.

Saso

comment:4 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from new to closed

Thank you for the input, the appropriate changes have been committed in r24899.

comment:5 Changed 4 years ago by anonymous

#8529

this helpt me with the amule compile on ubuntu 12.0.4.2 server 32bit

with the 12.09 branch (Attitude Adjustment)

thx :P

comment:6 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.