| Anonymous | Login | Signup for a new account | 11-10-2008 10:48 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0000376 | [buildroot] Architecture Specific | major | always | 08-11-05 02:46 | 02-12-07 05:50 | ||||
| Reporter | mdeschamps | View Status | public | ||||||
| Assigned To | buildroot | ||||||||
| Priority | normal | Resolution | duplicate | ||||||
| Status | closed | Product Version | 0.9.27 | ||||||
| Summary | 0000376: libstdc++ LFS support with gcc4.0.0 missing declarations of fseeko64 , ftello64 | ||||||||
| Description |
See below trace. ftello64 and fseeko64 are undeclared and it gets the compiler crying. 1. #undefining _GLIBCXX_USE_LFS is a quick fix, for : include/ext/stdio_sync_filebuf.h : #ifdef _GLIBCXX_USE_LFS if (!fseeko64(_M_file, __off, __whence)) __ret = std::streampos(ftello64(_M_file)); #else if (!fseek(_M_file, __off, __whence)) __ret = std::streampos(std::ftell(_M_file)); #endif 2. or telling -fpermissive (like to the compiler propose it) in the Makefile is another |
||||||||
| Additional Information |
/usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h: In member function 'virtual std::streampos __gnu_cxx::stdio_sync_filebuf<_CharT, _Traits>::seekoff(std::streamoff, std::_Ios_Seekdir, std::_Ios_Openmode)': /usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h:171: error: there are no arguments to 'fseeko64' that depend on a template parameter, so a declaration of 'fseeko64' must be available /usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h:171: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) /usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h:172: error: there are no arguments to 'ftello64' that depend on a template parameter, so a declaration of 'ftello64' must be available /usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h: In member function 'virtual std::streampos __gnu_cxx::stdio_sync_filebuf<_CharT, _Traits>::seekoff(std::streamoff, std::_Ios_Seekdir, std::_Ios_Openmode)': /usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h:171: error: there are no arguments to 'fseeko64' that depend on a template parameter, so a declaration of 'fseeko64' must be available /usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h:171: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) /usr/local/buildroot/toolchain_build_arm/gcc-4.0.0-final/arm-linux-uclibc/libstdc++-v3/include/ext/stdio_sync_filebuf.h:172: error: there are no arguments to 'ftello64' that depend on a template parameter, so a declaration of 'ftello64' must be available make[4]: *** [globals_io.lo] Erreur 1 make[4]: *** Attente des t |
||||||||
| Attached Files | |||||||||
|
|
|||||||||
Notes |
|
|
(0000402) mdeschamps 08-11-05 03:32 |
BTW, integrated Bug 0000051 patch on crossconfig.m4 file seems not be doing its work , I mean ... ----- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ machine/endian.h machine/param.h sys/machine.h sys/types.h \ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) SECTION_FLAGS='-ffunction-sections -fdata-sections' AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT GLIBCXX_CHECK_WCHAR_T_SUPPORT # For LFS. AC_DEFINE(HAVE_INT64_T) case "$target" in *-uclinux*) # Don't enable LFS with uClinux ;; *) AC_DEFINE(_GLIBCXX_USE_LFS) esac ----- ... still defines _GLIBCXX_USE_LFS |
|
(0000404) vapier 08-11-05 05:35 |
gcc bug, not uClibc bug, file a bug at the gcc bugzilla please |
|
(0000425) mdeschamps 08-18-05 08:00 edited on: 08-18-05 08:00 |
I have made upon a anti-LFS-patch which works if you still want to use stdlibc++ with gcc.4.0.0 without Large File Support. Thus it will use good old stdin::fseek, stdin::ftell. It must be a bit less optimized all the same do we need large files onto embedded target :) ? ------------ diff -Nur gcc-4.0.0/libstdc++-v3/./config/io/basic_file_stdio.cc.orig gcc-4.0.0/libstdc++-v3/./config/io/basic_file_stdio.cc --- gcc-4.0.0/libstdc++-v3/./config/io/basic_file_stdio.cc.orig 2005-08-11 17:00:34.000000000 +0200 +++ gcc-4.0.0/libstdc++-v3/./config/io/basic_file_stdio.cc 2005-08-11 17:03:22.000000000 +0200 @@ -70,6 +70,12 @@ #include <limits> // For <off_t>::max() and min() and <streamsize>::max() +// Dumb mode : undefining LFS ! +//$ mercredi 08/10/05 09:03:42 md(root)$ +// +#undef _GLIBCXX_USE_LFS + + namespace __gnu_internal { // Map ios_base::openmode flags to a string for use in fopen(). diff -Nur gcc-4.0.0/libstdc++-v3/./acinclude.m4.orig gcc-4.0.0/libstdc++-v3/./acinclude.m4 --- gcc-4.0.0/libstdc++-v3/./acinclude.m4.orig 2005-08-11 17:03:32.000000000 +0200 +++ gcc-4.0.0/libstdc++-v3/./acinclude.m4 2005-08-11 17:07:45.000000000 +0200 @@ -560,37 +560,38 @@ fi ]) - +dnl $ mercredi 08/10/05 09:03:42 md(root) $ +dnl Dumb mode : no check, no LFS mode leave my alone with it ! dnl dnl Check whether LFS support is available. dnl -AC_DEFUN([GLIBCXX_CHECK_LFS], [ - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -fno-exceptions" - AC_CACHE_VAL(glibcxx_cv_LFS, [ - AC_TRY_LINK( - [#include <unistd.h> - #include <stdio.h> - #include <sys/stat.h> - ], - [FILE* fp; - fopen64("t", "w"); - fseeko64(fp, 0, SEEK_CUR); - ftello64(fp); - lseek64(1, 0, SEEK_CUR); - struct stat64 buf; - fstat64(1, &buf);], - [glibcxx_cv_LFS=yes], - [glibcxx_cv_LFS=no]) - ]) - if test $glibcxx_cv_LFS = yes; then - AC_DEFINE(_GLIBCXX_USE_LFS) - fi - CXXFLAGS="$ac_save_CXXFLAGS" - AC_LANG_RESTORE -]) +dnl AC_DEFUN([GLIBCXX_CHECK_LFS], [ +dnl AC_LANG_SAVE +dnl AC_LANG_CPLUSPLUS +dnl ac_save_CXXFLAGS="$CXXFLAGS" +dnl CXXFLAGS="$CXXFLAGS -fno-exceptions" +dnl AC_CACHE_VAL(glibcxx_cv_LFS, [ +dnl AC_TRY_LINK( +dnl [#include <unistd.h> +dnl #include <stdio.h> +dnl #include <sys/stat.h> +dnl ], +dnl [FILE* fp; +dnl fopen64("t", "w"); +dnl fseeko64(fp, 0, SEEK_CUR); +dnl ftello64(fp); +dnl lseek64(1, 0, SEEK_CUR); +dnl struct stat64 buf; +dnl fstat64(1, &buf);], +dnl [glibcxx_cv_LFS=yes], +dnl [glibcxx_cv_LFS=no]) +dnl ]) +dnl if test $glibcxx_cv_LFS = yes; then +dnl AC_DEFINE(_GLIBCXX_USE_LFS) +dnl fi +dnl CXXFLAGS="$ac_save_CXXFLAGS" +dnl AC_LANG_RESTORE +dnl ]) dnl diff -Nur gcc-4.0.0/libstdc++-v3/./configure.orig gcc-4.0.0/libstdc++-v3/./configure --- gcc-4.0.0/libstdc++-v3/./configure.orig 2005-08-11 17:07:54.000000000 +0200 +++ gcc-4.0.0/libstdc++-v3/./configure 2005-08-11 17:09:06.000000000 +0200 @@ -83552,8 +83552,11 @@ # Don't enable LFS with uClibc ;; *) +# Say no to LFS ! :) +# $ mercredi 08/10/05 09:03:42 md(root) $ +# cat >>confdefs.h <<\_ACEOF -#define _GLIBCXX_USE_LFS 1 +#undef _GLIBCXX_USE_LFS _ACEOF esac diff -Nur gcc-4.0.0/libstdc++-v3/./configure.ac.orig gcc-4.0.0/libstdc++-v3/./configure.ac --- gcc-4.0.0/libstdc++-v3/./configure.ac.orig 2005-08-11 17:09:08.000000000 +0200 +++ gcc-4.0.0/libstdc++-v3/./configure.ac 2005-08-11 17:10:03.000000000 +0200 @@ -139,8 +139,10 @@ # For the __streamoff_base_type typedef. GLIBCXX_CHECK_INT64_T + # LFS Go away ! don't even check ! :/ + # $ mercredi 08/10/05 09:03:42 md$ # For LFS support. - GLIBCXX_CHECK_LFS + # GLIBCXX_CHECK_LFS AC_LC_MESSAGES diff -Nur gcc-4.0.0/libstdc++-v3/./include/ext/stdio_sync_filebuf.h.orig gcc-4.0.0/libstdc++-v3/./include/ext/stdio_sync_filebuf.h --- gcc-4.0.0/libstdc++-v3/./include/ext/stdio_sync_filebuf.h.orig 2005-08-11 17:11:28.000000000 +0200 +++ gcc-4.0.0/libstdc++-v3/./include/ext/stdio_sync_filebuf.h 2005-08-11 17:12:32.000000000 +0200 @@ -44,6 +44,12 @@ #include <cwchar> #endif + +// Anti-evil LFS action ! +//$ mercredi 08/10/05 09:03:42 md(root)$ +// +#undef _GLIBCXX_USE_LFS + namespace __gnu_cxx { /// @brief class stdio_sync_filebuf. diff -Nur gcc-4.0.0/libstdc++-v3/./testsuite/27_io/fpos/14775.cc.orig gcc-4.0.0/libstdc++-v3/./testsuite/27_io/fpos/14775.cc --- gcc-4.0.0/libstdc++-v3/./testsuite/27_io/fpos/14775.cc.orig 2005-08-11 17:12:32.000000000 +0200 +++ gcc-4.0.0/libstdc++-v3/./testsuite/27_io/fpos/14775.cc 2005-08-11 17:13:39.000000000 +0200 @@ -22,6 +22,11 @@ #include <fstream> #include <testsuite_hooks.h> + +// Anti-eviliest LFS action ! +//$ mercredi 08/10/05 09:03:42 md(root) $ +// +#undef _GLIBCXX_USE_LFS #define TWO_GB 2147483648UL diff -Nur gcc-4.0.0/libstdc++-v3/./crossconfig.m4.orig gcc-4.0.0/libstdc++-v3/./crossconfig.m4 --- gcc-4.0.0/libstdc++-v3/./crossconfig.m4.orig 2005-08-11 17:57:57.000000000 +0200 +++ gcc-4.0.0/libstdc++-v3/./crossconfig.m4 2005-08-11 17:58:42.000000000 +0200 @@ -153,15 +153,19 @@ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT GLIBCXX_CHECK_WCHAR_T_SUPPORT +# +# Oh that's enough with ! +#$ mercredi 08/10/05 09:03:42 md(root) $ +# # For LFS. - AC_DEFINE(HAVE_INT64_T) - case "$target" in - *-uclinux*) - # Don't enable LFS with uClinux - ;; - *) - AC_DEFINE(_GLIBCXX_USE_LFS) - esac + #AC_DEFINE(HAVE_INT64_T) + #case "$target" in + # *-uclinux*) + # # Don't enable LFS with uClinux + # ;; + # *) + # AC_DEFINE(_GLIBCXX_USE_LFS) + #esac # For showmanyc_helper(). AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) |
|
(0000631) vapier 10-17-05 15:12 |
dupe of http://busybox.net/bugs/view.php?id=51 [^] |
| Copyright © 2000 - 2006 Mantis Group |