ucsconv.c:66: undefined reference to `_iconv_to_ucs_ces'
Sebastian Huber <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Hello, we have a couple of tests in RTEMS which use iconv functions. I get a linker error with the recent Newlib, for example: [1621/4384] Linking /tmp/sh/b-rtems/arm/fvp_cortex_r52/testsuites/fstests/fsdosfsname01.exe /opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld: /opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/lib/thumb/cortex-r52/hard/libc.a(libc_a-ucsconv.o): in function `ucs_based_conversion_open': /home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:66: undefined reference to `_iconv_to_ucs_ces' /opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld: /home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:66: undefined reference to `_iconv_to_ucs_ces' /opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld: /home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:78: undefined reference to `_iconv_from_ucs_ces' /opt/rtems/7/lib/gcc/arm-rtems7/12.0.1/../../../../arm-rtems7/bin/ld: /home/EB/sebastian_h/src/rtems-source-builder/rtems/build/arm-rtems7-gcc-e9ea301-newlib-d88cbd0-x86_64-linux-gnu-1/build/arm-rtems7/thumb/cortex-r52/hard/newlib/../../../../../../gnu-mirror-gcc-e9ea301/newlib/libc/iconv/lib/ucsconv.c:78: undefined reference to `_iconv_from_ucs_ces' Previously, we had in a Makefile.am this: diff --git a/newlib/libc/iconv/ces/Makefile.am b/newlib/libc/iconv/ces/Makefile.am deleted file mode 100644 index f59401305..000000000 --- a/newlib/libc/iconv/ces/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -## Process this file with automake to generate Makefile.in - -AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(TARGET_CFLAGS) - -GENERAL_SOURCES = \ - utf-8.c \ - utf-16.c \ - ucs-2.c \ - us-ascii.c \ - ucs-4.c \ - ucs-2-internal.c \ - ucs-4-internal.c \ - cesbi.c \ - table.c \ - table-pcs.c \ - euc.c - -## The following interfaces are EL/IX level 2 -if ELIX_LEVEL_1 -ELIX_SOURCES = \ - utf-8.c \ - utf-16.c \ - ucs-2.c \ - us-ascii.c \ - ucs-4.c \ - ucs-2-internal.c \ - ucs-4-internal.c \ - cesbi.c \ - table.c \ - table-pcs.c \ - euc.c -else -ELIX_SOURCES = -endif - -noinst_LIBRARIES = lib.a -lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES) -lib_a_CFLAGS = $(AM_CFLAGS) This was replaced by: diff --git a/newlib/libc/iconv/ces/Makefile.inc b/newlib/libc/iconv/ces/Makefile.inc new file mode 100644 index 000000000..6fb933970 --- /dev/null +++ b/newlib/libc/iconv/ces/Makefile.inc @@ -0,0 +1,19 @@ +if ENABLE_NEWLIB_ICONV + +## The following interfaces are EL/IX level 2 +if ELIX_LEVEL_1 +libc_a_SOURCES += \ + %D%/utf-8.c \ + %D%/utf-16.c \ + %D%/ucs-2.c \ + %D%/us-ascii.c \ + %D%/ucs-4.c \ + %D%/ucs-2-internal.c \ + %D%/ucs-4-internal.c \ + %D%/cesbi.c \ + %D%/table.c \ + %D%/table-pcs.c \ + %D%/euc.c +endif + +endif I have no idea what this ELIX_LEVEL_1 stuff is supposed to do. In particular, I don't understand the previous Makefile.am: lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES) It seems the source files end up in lib_a_SOURCES at least once no matter how ELIX_LEVEL_1 is defined. This is no longer the case for the Makefile.inc variant. This contradicts a bit with the new newlib/libc/iconv/lib/Makefile.inc: if ENABLE_NEWLIB_ICONV libc_a_SOURCES += \ %D%/aliasesi.c \ %D%/ucsconv.c \ %D%/nullconv.c \ %D%/iconv.c \ %D%/aliasesbi.c \ %D%/iconvnls.c ## The following interfaces are EL/IX level 2 if !ELIX_LEVEL_1 libc_a_SOURCES += \ %D%/aliasesi.c \ %D%/ucsconv.c \ %D%/nullconv.c \ %D%/iconv.c \ %D%/aliasesbi.c \ %D%/iconvnls.c endif endif LIBC_CHEWOUT_FILES += %D%/iconv.def Here, the files are also added at least once to libc_a_SOURCES (if ENABLE_NEWLIB_ICONV is true). Should be just remove this ELIX_LEVEL_1 handling in the iconv directory? -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: [email protected] phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/