Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh-cn/posts/20210801-upstream-community/ #18

Open
utterances-bot opened this issue Aug 15, 2021 · 8 comments
Open

zh-cn/posts/20210801-upstream-community/ #18

utterances-bot opened this issue Aug 15, 2021 · 8 comments

Comments

@utterances-bot
Copy link

2021年二季度社区动态 - LoongArch 开放社区

2021年二季度社区动态

https://loongarch.dev/zh-cn/posts/20210801-upstream-community/

Copy link

进度很快,nice

Copy link

怎么新建项目

@yetist
Copy link
Contributor

yetist commented Oct 21, 2021

您指的是在哪里新建项目?新建什么项目?

怎么新建项目

@movie0125
Copy link

movie0125 commented Oct 21, 2021 via email

Copy link

YOLOMIN commented Apr 18, 2022

您好,我想请问一下,使用编译gcc的时候,出现configure: error: cannot compute suffix of object files: cannot compile,这个问题有什么解决方案嘛》?

@yetist
Copy link
Contributor

yetist commented Apr 20, 2022

您好,我想请问一下,使用编译gcc的时候,出现configure: error: cannot compute suffix of object files: cannot compile,这个问题有什么解决方案嘛》?

应该是在 configure 阶段,编译测试时没有成功造成的,具体可以看一下 config.log 文件,看看里面报了什么错。

@YOLOMIN
Copy link

YOLOMIN commented Apr 20, 2022

您好,我使用的是 https://github.com/loongson/gcc项目中的源码,在编译的过程中,编译到libgcc模块的时候报了如下错误:

make[3]: Leaving directory '/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/gcc'
mkdir -p -- loongarch64-loongson-linux/libgcc
Checking multilib configuration for libgcc...
Configuring stage 1 in loongarch64-loongson-linux/libgcc
configure: creating cache ./config.cache
checking build system type... loongarch64-loongson-linux-gnu
checking host system type... loongarch64-loongson-linux-gnu
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking for loongarch64-loongson-linux-ar... ar
checking for loongarch64-loongson-linux-lipo... lipo
checking for loongarch64-loongson-linux-nm... /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/nm
checking for loongarch64-loongson-linux-ranlib... ranlib
checking for loongarch64-loongson-linux-strip... strip
checking whether ln -s works... yes
checking for loongarch64-loongson-linux-gcc... /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking
checking for suffix of object files... configure: error: in `/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/loongarch64-loongson-linux/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make[2]: *** [Makefile:19065: configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux'
make[1]: *** [Makefile:24836: stage1-bubble] Error 2
make[1]: Leaving directory '/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux'
make: *** [Makefile:25775: profiledbootstrap] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.uqPfzD (%build)

关于/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/loongarch64-loongson-linux/libgcc/config.log中的内容如下所示:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ /builddir/build/BUILD/gcc-8.4.1-20200928/libgcc/configure --srcdir=../../../libgcc --cache-file=./config.cache --enable-bootstrap --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.openanolis.cn --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-languages=c,c++,fortran,lto,objc,obj-c++ --program-transform-name=s,y,y, --disable-option-checking --with-target-subdir=loongarch64-loongson-linux --build=loongarch64-loongson-linux --host=loongarch64-loongson-linux --target=loongarch64-loongson-linux --disable-intermodule --enable-checking=release,types --disable-coverage --enable-languages=c,c++,lto --disable-build-format-warnings

## --------- ##
## Platform. ##
## --------- ##

hostname = localhost.localdomain
uname -m = loongarch64
uname -r = 4.19.190-2.lns8.loongarch64
uname -s = Linux
uname -v = #1 SMP Sat Sep 18 06:47:40 UTC 2021

/usr/bin/uname -p = loongarch64
/bin/uname -X     = unknown

/bin/arch              = loongarch64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/share/Modules/bin
PATH: /usr/local/sbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2083: creating cache ./config.cache
configure:2295: checking build system type
configure:2309: result: loongarch64-loongson-linux-gnu
configure:2329: checking host system type
configure:2342: result: loongarch64-loongson-linux-gnu
configure:2448: checking for --enable-version-specific-runtime-libs
configure:2461: result: no
configure:2532: checking for a BSD-compatible install
configure:2600: result: /usr/bin/install -c
configure:2616: checking for gawk
configure:2643: result: gawk
configure:2766: checking for loongarch64-loongson-linux-ar
configure:2793: result: ar
configure:2858: checking for loongarch64-loongson-linux-lipo
configure:2885: result: lipo
configure:2950: checking for loongarch64-loongson-linux-nm
configure:2977: result: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/nm
configure:3042: checking for loongarch64-loongson-linux-ranlib
configure:3069: result: ranlib
configure:3134: checking for loongarch64-loongson-linux-strip
configure:3161: result: strip
configure:3223: checking whether ln -s works
configure:3227: result: yes
configure:3244: checking for loongarch64-loongson-linux-gcc
configure:3271: result: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking
configure:3540: checking for C compiler version
configure:3549: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking --version >&5
xgcc (GCC) 12.0.1 20220324 (Anolis 8.4.1-1.0.1)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3560: $? = 0
configure:3549: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking -v >&5
Reading specs from /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/specs
COLLECT_GCC=/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc
COLLECT_LTO_WRAPPER=/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/lto-wrapper
Target: loongarch64-loongson-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.openanolis.cn --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --build=loongarch64-loongson-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.1 20220324 (Anolis 8.4.1-1.0.1) (GCC)
configure:3560: $? = 0
configure:3549: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking -V >&5
xgcc: error: unrecognized command-line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3560: $? = 1
configure:3549: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking -qversion >&5
xgcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
xgcc: fatal error: no input files
compilation terminated.
configure:3560: $? = 1
configure:3576: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking -o conftest -O2 -g   conftest.c  >&5
Assembler messages:
Error: unrecognized option -'lp64d
configure:3579: $? = 1
configure:3792: checking for suffix of object files
configure:3814: /builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking -c -O2 -g  conftest.c >&5
Assembler messages:
Error: unrecognized option -'lp64d
configure:3818: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3832: error: in `/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/loongarch64-loongson-linux/libgcc':
configure:3834: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=loongarch64-loongson-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -g'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=loongarch64-loongson-linux
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=loongarch64-loongson-linux
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=loongarch64-loongson-linux
ac_cv_host=loongarch64-loongson-linux-gnu
ac_cv_prog_AR=ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC='/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking'
ac_cv_prog_LIPO=lipo
ac_cv_prog_NM=/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/nm
ac_cv_prog_RANLIB=ranlib
ac_cv_prog_STRIP=strip

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='ar'
AWK='gawk'
CC='/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/xgcc -B/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/ -B/usr/loongarch64-loongson-linux/bin/ -B/usr/loongarch64-loongson-linux/lib/ -isystem /usr/loongarch64-loongson-linux/include -isystem /usr/loongarch64-loongson-linux/sys-include   -fno-checking'
CET_FLAGS=''
CFLAGS='-O2 -g'
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INSTALL_DATA='/usr/bin/install -c -m 644'
INSTALL_PROGRAM='/usr/bin/install -c'
INSTALL_SCRIPT='/usr/bin/install -c'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIPO='lipo'
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
NM='/builddir/build/BUILD/gcc-8.4.1-20200928/obj-loongarch64-loongson-linux/./gcc/nm'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='GNU C Runtime Library'
PACKAGE_STRING='GNU C Runtime Library 1.0'
PACKAGE_TARNAME='libgcc'
PACKAGE_URL='http://www.gnu.org/software/libgcc/'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
PICFLAG='-fpic'
RANLIB='ranlib'
SHELL='/bin/sh'
STRIP='strip'
ac_ct_CC=''
accel_dir_suffix=''
asm_hidden_op=''
bindir='${exec_prefix}/bin'
build='loongarch64-loongson-linux-gnu'
build_alias='loongarch64-loongson-linux'
build_cpu='loongarch64'
build_libsubdir='build-loongarch64-loongson-linux'
build_os='linux-gnu'
build_subdir='build-loongarch64-loongson-linux'
build_vendor='loongson'
cpu_type=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
decimal_float=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
double_type_size=''
dvidir='${docdir}'
enable_decimal_float=''
enable_execute_stack=''
enable_gcov='yes'
enable_shared='yes'
enable_vtable_verify='no'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
force_explicit_eh_registry=''
get_gcc_base_ver=''
host='loongarch64-loongson-linux-gnu'
host_alias='loongarch64-loongson-linux'
host_cpu='loongarch64'
host_noncanonical='loongarch64-loongson-linux'
host_os='linux-gnu'
host_subdir='.'
host_vendor='loongson'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='/usr/share/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='../../../libgcc/..'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
long_double_type_size=''
mandir='/usr/share/man'
md_unwind_header=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
program_transform_name='s,y,y,'
psdir='${docdir}'
real_host_noncanonical=''
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
set_use_emutls=''
sfp_machine_header=''
sharedstatedir='${prefix}/com'
slibdir='$(libdir)'
solaris_ld_v2_maps=''
sysconfdir='${prefix}/etc'
target_alias='loongarch64-loongson-linux'
target_noncanonical='loongarch64-loongson-linux'
target_subdir='loongarch64-loongson-linux'
thread_header=''
tm_defines=''
tm_file=''
tmake_file=''
toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
toolexeclibdir='$(libdir)/../lib64'
unwind_header=''
use_tm_clone_registry=''
vis_hide=''
with_aix_soname='aix'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "GNU C Runtime Library"
#define PACKAGE_TARNAME "libgcc"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "GNU C Runtime Library 1.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL "http://www.gnu.org/software/libgcc/"

configure: exit 1

关于configure的调用如下所示:
../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.openanolis.cn --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --build=loongarch64-loongson-linux

关于make如下所示:
make -j32 'BOOT_CFLAGS=-O2 -g' BOOT_LDFLAGS= LDFLAGS_FOR_TARGET= profiledbootstrap

我研究了该config.log已经两三天了,实在没有发现存在什么问题,如有了解请指点一二~

@yetist
Copy link
Contributor

yetist commented Apr 22, 2022

问题是这个:

Error: unrecognized option -'lp64d

背景情况我不确定,从 config.log 中我推断,你应该是在产品版系统中,编译社区版gcc代码,是吗?

如果是这样的话,请阅读最新的龙芯架构工具链约定文档,这个选项在产品版本中是没有支持的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants