انجمنهای فارسی اوبونتو
کمک و پشتیبانی => انجمن عمومی => نویسنده: ɴɪᴍᴀ در 02 تیر 1401، 05:28 بظ
-
سلام
مشکل چیه؟ دارم gcc رو کامپایل میکنم!
/usr/bin/ld: build/gentarget-def.o: in function `def_target_insn(char const*, char const*)':
/mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:161: undefined reference to `hash_table<insn_hasher, false, xcallocator>::find_with_hash(char const* const&, unsigned int)'
/usr/bin/ld: /mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:223: undefined reference to `hash_table<nofree_string_hash, false, xcallocator>::find_slot(char const* const&, insert_option)'
/usr/bin/ld: /mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:186: undefined reference to `hash_map<nofree_string_hash, char const*, simple_hashmap_traits<default_hash_traits<nofree_string_hash>, char const*> >::get_or_insert(char const* const&, bool*)'
/usr/bin/ld: build/gentarget-def.o: in function `main':
/mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:289: undefined reference to `hash_table<insn_hasher, false, xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)'
/usr/bin/ld: /mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:290: undefined reference to `hash_table<nofree_string_hash, false, xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)'
/usr/bin/ld: /mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:291: undefined reference to `hash_map<nofree_string_hash, char const*, simple_hashmap_traits<default_hash_traits<nofree_string_hash>, char const*> >::hash_map(unsigned long, bool, bool, bool)'
/usr/bin/ld: /mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:293: undefined reference to `md_rtx_info::md_rtx_info()'
/usr/bin/ld: /mnt/lfs/sources/gcc/build/gcc/../../gcc/gentarget-def.c:274: undefined reference to `hash_table<insn_hasher, false, xcallocator>::find_slot_with_hash(char const* const&, unsigned int, insert_option)'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3004: build/gentarget-def] Error 1
make[2]: Leaving directory '/mnt/lfs/sources/gcc/build/gcc'
make[1]: *** [Makefile:4420: all-gcc] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc/build'
make: *** [Makefile:947: all] Error 2
-
اصل کد را لطفاً بزارید.
-
??
-
اگه همه چی رو درست تنظیم کرده باشین یا باید مشکل از نسخه gcc باشه یا کتابخونه ها
-
چطور میتونم gcc اوبونتو رو به نسخه ۴.۸ داون گرید کنم؟
-
چرا آخه؟!
۴.۸ یا ۸.۴؟
-
چرا آخه؟!
۴.۸ یا ۸.۴؟
lfs:
(https://forum.ubuntu-ir.org/index.php?action=dlattach;topic=155162.0;attach=53562;image)
-
بهتره که از همون نسخهای که روی سیستم میزبان نصب هست استفاده کنی. از کدوم نسخه استفاده می کنی؟
gcc --version
-
11.2.0
-
چرا داری خودت آن را کامپایل میکنی؟
اگر نسخه های قدیمی را میخواهی برو در اینترنت هست
-
LFS
-
??
خود gcc را کامپایل می کنید!
من قبلاً کامپایل کردم. نیاز به چند کتابخانه دارد و کامپایلش خیلی سخت است.بعضی از کتابخانه ها را هم باید از کد منبع کامپایل کنی.
https://medium.com/@darrenjs/building-gcc-from-source-dcc368a3bb70 (https://medium.com/@darrenjs/building-gcc-from-source-dcc368a3bb70)