Modify

Opened 8 years ago

Closed 5 years ago

Last modified 4 years ago

#7256 closed defect (not_a_bug)

gcc package build error

Reported by: moo <moo.tinys@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

this is about build gcc package that will run on target system, not the staging/cross compile binary

$ grep -i GCC .config
# CONFIG_GCC_VERSION_3_4_6 is not set
# CONFIG_GCC_VERSION_4_1_2 is not set
# CONFIG_GCC_VERSION_4_2_4 is not set
# CONFIG_GCC_VERSION_4_3_3 is not set
# CONFIG_GCC_VERSION_4_3_4 is not set
# CONFIG_GCC_VERSION_4_4_1 is not set
CONFIG_GCC_VERSION_4_4_2=y
# CONFIG_GCC_VERSION_4_4_3 is not set
# CONFIG_GCC_VERSION_LLVM is not set
# CONFIG_GCC_VERSION_4_3_3_CS is not set
# CONFIG_GCC_VERSION_4_4_1_CS is not set
# CONFIG_GCC_VERSION_4_4_3_CS is not set
CONFIG_GCC_USE_GRAPHITE=y
CONFIG_EXTRA_GCC_CONFIG_OPTIONS=""
CONFIG_GCC_VERSION="4.4.2"
CONFIG_GCC_VERSION_4=y
CONFIG_GCC_VERSION_4_4=y
CONFIG_PACKAGE_gcc=m
checking for correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

i then update the file as:

  • home/moo/src/openwrt-trunk/feeds/packages/devel/gcc/Makefile

     
    5858                       --disable-nls \ 
    5959                       --disable-libmudflap \ 
    6060                       --disable-multilib \ 
     61                       --with-gmp=$(TOPDIR)/staging_dir/host \ 
     62                       --with-mpfr=$(TOPDIR)/staging_dir/host \ 
     63                       --disable-decimal-float \ 
    6164                       $(EXTRA_TARGET) \ 
    6265                       $(SOFT_FLOAT_CONFIG_OPTION) \ 
    6366                       $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ 

but it said autoconf 2.59 is required, not 2.62 which comes with glibc

$ grep 2.59 /home/moo/src/openwrt-trunk/build_dir/target-i386_glibc-2.7/gcc-4.4.2/libstdc++-v3/configure.ac
AC_PREREQ(2.59)

retrying with:

  • home/moo/src/openwrt-trunk/feeds/packages/devel/gcc/Makefile

     
    3737       $(call Build/Prepare/Default) 
    3838       $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c 
    3939       $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(PKG_BUILD_DIR)/gcc/version.c 
    40        (cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;); 
     40       #(cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;); 
    4141       $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(PKG_BUILD_DIR)/libstdc++-v3/configure 
    4242endef 
    4343 
     
    5858                       --disable-nls \ 
    5959                       --disable-libmudflap \ 
    6060                       --disable-multilib \ 
     61                       --with-gmp=$(TOPDIR)/staging_dir/host \ 
     62                       --with-mpfr=$(TOPDIR)/staging_dir/host \ 
     63                       --disable-decimal-float \ 
    6164                       $(EXTRA_TARGET) \ 
    6265                       $(SOFT_FLOAT_CONFIG_OPTION) \ 
    6366                       $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ 

i get a lots of undefined symbol to c++ stuff

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by moo <moo.tinys@…>

i486-openwrt-linux-gnu-ranlib  libbackend.a
i486-openwrt-linux-gnu-gcc   -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o c-parser.o i386-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \
          main.o  libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/lib -lcloog -L/lib -lppl_c -lppl -lgmpxx  -L/home/moo/src/openwrt-trunk/staging_dir/host/lib -L/home/moo/src/openwrt-trunk/staging_dir/host/lib -lmpfr -lgmp
/home/moo/src/openwrt-trunk/staging_dir/host/lib/libppl_c.a(ppl_c_implementation_common.o): In function `ppl_delete_Grid_Generator_System_const_iterator':
/home/moo/src/openwrt-trunk/build_dir/host/ppl-0.10.2/interfaces/C/ppl_c_implementation_common.cc:1642: undefined reference to `operator delete(void*)'
/home/moo/src/openwrt-trunk/staging_dir/host/lib/libppl_c.a(ppl_c_implementation_common.o): In function `ppl_delete_Congruence_System_const_iterator':
/home/moo/src/openwrt-trunk/build_dir/host/ppl-0.10.2/interfaces/C/ppl_c_implementation_common.cc:1336: undefined reference to `operator delete(void*)'
/home/moo/src/openwrt-trunk/staging_dir/host/lib/libppl_c.a(ppl_c_implementation_common.o): In function `ppl_delete_Generator_System_const_iterator':
/home/moo/src/openwrt-trunk/build_dir/host/ppl-0.10.2/interfaces/C/ppl_c_implementation_common.cc:1046: undefined reference to `operator delete(void*)'
/home/moo/src/openwrt-trunk/staging_dir/host/lib/libppl_c.a(ppl_c_implementation_common.o): In function `ppl_delete_Constraint_System_const_iterator':
/home/moo/src/openwrt-trunk/build_dir/host/ppl-0.10.2/interfaces/C/ppl_c_implementation_common.cc:735: undefined reference to `operator delete(void*)'
/home/moo/src/openwrt-trunk/staging_dir/host/lib/libppl_c.a(ppl_c_implementation_common.o): In function `__static_initialization_and_destruction_0':
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/iostream:77: undefined reference to `std::ios_base::Init::Init()'
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/iostream:77: undefined reference to `std::ios_base::Init::~Init()'
/home/moo/src/openwrt-trunk/staging_dir/host/lib/libppl_c.a(ppl_c_implementation_common.o): In function `__static_initialization_and_destruction_0':
/home/moo/src/openwrt-trunk/build_dir/host/ppl-0.10.2/interfaces/C/../../src/ppl.hh:40959: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/home/moo/src/openwrt-trunk/build_dir/host/ppl-0.10.2/interfaces/C/../../src/ppl.hh:40959: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/moo/src/openwrt-trunk/build_dir/host/ppl-0.10.2/interfaces/C/../../src/ppl.hh:40960: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
make[5]: Leaving directory `/home/moo/src/openwrt-trunk/build_dir/target-i386_glibc-2.7/gcc-4.4.2/host-i486-openwrt-linux-gnu/gcc'
make[4]: Leaving directory `/home/moo/src/openwrt-trunk/build_dir/target-i386_glibc-2.7/gcc-4.4.2'
make[3]: Leaving directory `/home/moo/src/openwrt-trunk/build_dir/target-i386_glibc-2.7/gcc-4.4.2'
make[2]: Leaving directory `/home/moo/src/openwrt-trunk/feeds/packages/devel/gcc'
make[1]: Leaving directory `/home/moo/src/openwrt-trunk'

comment:2 Changed 7 years ago by moo.tinys@…

the patch is not working any more for GCC 4.5.1. ssp library is needed. can anyone figure out how to use it? adds a libssp to package or tools directory?

i'll give more detail later. gcc is required on my openwrt for skype for python api

comment:3 Changed 5 years ago by jogo

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

Please use the forums, IRC, or mailing lists for help in adding/modifying packages.

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