Modify

Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#10715 closed defect (worksforme)

Toolchain build fails: cmake vs glibc-devel-2.8-14.1 on x86_64

Reported by: wrosner@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: toolchain Version: Trunk
Keywords: cmake glibc x86_64 Cc:

Description

I followed the setup of Buildroot given here

http://wiki.openwrt.org/doc/howto/buildroot.exigence[[BR]]

After succesful "make config" I tried a first "make"

Obviously it first tries building the toolchain

Error Message:

make[3] -C tools/xz install
 make[3] -C tools/cmake compile
make -r world: build failed. Please re-run make with V=99 to see what's going on
make: *** [world] Fehler 1

The Error message was similiar to the one given here

(sorry, I haven't captured it)

http://www.mail-archive.com/fink-users@lists.sourceforge.net/msg32785.html

Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_entry.c.o
/sw/src/fink.build/cmake-2.8.2-1/cmake-2.8.2/Utilities/cmlibarchive/libarchive/archive_entry.c:130:
 error: static declaration of 'wcscpy' follows non-static declaration
/usr/include/wchar.h:149: error: previous declaration of 'wcscpy' was here
/sw/src/fink.build/cmake-2.8.2-1/cmake-2.8.2/Utilities/cmlibarchive/libarchive/archive_entry.c:139:
 error: static declaration of 'wcslen' follows non-static declaration
/usr/include/wchar.h:153: error: previous declaration of 'wcslen' was here

These are the offending declarations in

/usr/include/wchar.h

__BEGIN_NAMESPACE_STD
/* Copy SRC to DEST.  */
extern wchar_t *wcscpy (wchar_t *__restrict __dest,
                        __const wchar_t *__restrict __src) __THROW;

....
/* Return the number of wide characters in S.  */
extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__;
__END_NAMESPACE_STD

compared to the entry in

openwrt/trunk/build_dir/host/cmake-2.8.4/Utilities/cmlibarchive/libarchive/archive_entry.c

#ifndef HAVE_WCSCPY
static wchar_t * wcscpy(wchar_t *s1, const wchar_t *s2)
{
    wchar_t *dest = s1;
    while ((*s1 = *s2) != L'\0')
        ++s1, ++s2;
    return dest;
}
#endif
#ifndef HAVE_WCSLEN
static size_t wcslen(const wchar_t *s)
{
    const wchar_t *p = s;
    while (*p != L'\0')
        ++p;
    return p - s;
}
#endif

the offending declaration belongs to

rpm -qf /usr/include/wchar.h
glibc-devel-2.8-14.1

Without real understanding, I crudely uncommented the lines in archive_entry.c

This allowed compile of all the tools, but now I have the failure in the link stage:

[ 96%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/cmCursesWidget.o
[ 97%] Building CXX object Source/CMakeFiles/ccmake.dir/CursesDialog/ccmake.o
Linking CXX executable ../bin/ccmake
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/libmd.so: undefined reference to `global_stat'
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/libmd.so: undefined reference to `do_per_step'
.....
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/libmd.so: undefined reference to `calc_shifts'
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/libmd.so: undefined reference to `gmx_parallel_env'
collect2: ld returned 1 exit status
make[6]: *** [bin/ccmake] Error 1
make[6]: Leaving directory `/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4'
make[5]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2

Is this a compatibility issue of cmake with my glibc?

How to solve?

Have a old SuSE 11.0 - difficult to get upgrades - never change a running system....

which version required?

Other dependencies missed?

can I downgrade cmake instead?


Alternatively, I tried

http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/[[BR]]

but this seems not to run at all on my x86_64 architecture:

Clibc-0.9.30.1> make menuconfig V=99
make[1]: Entering directory `/home/wrosner/openwrt/backfire-10-03-01_brcm-2-4/OpenWrt-SDK-brcm-2.4-for-Linux-i686-gcc-3.4.6_uClibc-0.9.30.1/scripts/config'
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: i386 architecture of input file `zconf.tab.o' is incompatible with i386:x86-64 output 

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by wrosner@…

Looks like I could solve the issue.

What I did:

1) read http://www.mail-archive.com/fink-users@lists.sourceforge.net/msg32887.html

2) understand http://www.mail-archive.com/fink-users@lists.sourceforge.net/msg32887.html

3) find in our tree
./build_dir/host/cmake-2.8.4/CMakeFiles/CMakeOutput.log
and
./build_dir/host/cmake-2.8.4/CMakeFiles/CMakeError.log

4) find in ....Error.log somewhere near lines 13180-13223/14275 92% [ sic! ]
long lists of entries looking similiar to

/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/libmd.so: undefined reference to `pr_rvec'

5) use rpm -qf /usr/lib64/libmd.so.4.0.0
to find out that libmd.so belongs to some molecular design package named gromacs
which I-don't-know-how found its way on my machine

6) uninstall gromac, copy back original files to delete my crude hack

7) "touch" restored copy since mv leaves timestamp, so build does not find the change

8) do a 'make dirclean' at trunk dir since a simple 'make clean' leaves CMakeError.log (and surely many others) intact

9) do 'make', get a beer hope the best.

10) still waiting, desperate for another beer

At least it compiles and installs cmake (well, it says it did so),
so if it will still not work, it will get a new ticket.

While googling the error, I had the impression that there are many buggy packages around which may screw up the auto-whats-o-ever process of cmake.
Since it's difficult to analyze, it drives people crazy

I could reproduce the error, so for reference, here the error message which covered the underlying issue:

[ 30%] Built target cmbzip2
make[6]: Entering directory `/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4'
make[6]: Leaving directory `/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4'
make[6]: Entering directory `/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4'
[ 31%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_entry.c.o
/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4/Utilities/cmlibarchive/libarchive/archive_entry.c:136: error: static declaration of 'wcscpy' follows non-static declaration
/usr/include/wchar.h:139: error: previous declaration of 'wcscpy' was here
/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4/Utilities/cmlibarchive/libarchive/archive_entry.c:145: error: static declaration of 'wcslen' follows non-static declaration
/usr/include/wchar.h:249: error: previous declaration of 'wcslen' was here
make[6]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_entry.c.o] Error 1
make[6]: Leaving directory `/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4'
make[5]: *** [Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/all] Error 2
make[5]: Leaving directory `/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4'
make[3]: *** [/home/wrosner/openwrt/trunk/build_dir/host/cmake-2.8.4/.built] Error 2
make[3]: Leaving directory `/home/wrosner/openwrt/trunk/tools/cmake'
make[2]: *** [tools/cmake/compile] Error 2
make[2]: Leaving directory `/home/wrosner/openwrt/trunk'
make[1]: *** [/home/wrosner/openwrt/trunk/staging_dir/target-mipsel_uClibc-0.9.32/stamp/.tools_install_nnynn] Error 2
make[1]: Leaving directory `/home/wrosner/openwrt/trunk'
make: *** [world] Fehler 2

comment:2 Changed 4 years ago by nbd

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

works for me in current versions

comment:3 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.