免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: letwave
打印 上一主题 下一主题

C compiler cannot create executables [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-09-03 10:06 |只看该作者

回复 #10 letwave 的帖子

# locate crt1.o

/usr/lib64/crt1.o

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
12 [报告]
发表于 2008-09-03 10:07 |只看该作者
原帖由 letwave 于 2008-9-3 10:01 发表
如果-m后面是32的话,就会出现找不到crt1.o,如果改成64的话,生成的可执行程序就出错了。
好像不是生成的32bit version on 64 bit platform.

估计你需要 32-bit 的 libc6-dev 包。

论坛徽章:
0
13 [报告]
发表于 2008-09-03 10:15 |只看该作者

回复 #12 MMMIX 的帖子

谢谢,我装装试试哈。

论坛徽章:
0
14 [报告]
发表于 2008-09-03 13:55 |只看该作者

回复 #12 MMMIX 的帖子

安装了32bit version on 64 bit platform.之后这个地方通过了,但是在链接库是出错了,
说/usr/bin/ld:cannot find -lX11
我是指定了X11库的位置在/usr/lib64的呢,为啥出错呢?
在编译过程中有这样一句:
-L/usr/lib64 -lX11 -ldl -lm -lncurses
我在生成的makefile中并没有找到-lX11这一项呢,为啥在编译的时候要出来呢,我觉得直接:
-L/usr/lib64 -ldl -lm -lncurses就可以了,-lX11怎么变成默认加进去了呢。makefile如下:

论坛徽章:
0
15 [报告]
发表于 2008-09-03 13:57 |只看该作者

回复 #14 letwave 的帖子

makefile:

srcdir = .
top_srcdir = .

pkgdatadir = $(datadir)/sac
pkglibdir = $(libdir)/sac
pkgincludedir = $(includedir)/sac
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
target_triplet = x86_64-unknown-linux-gnu
am__append_1 = libedit
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(top_srcdir)/configure config/compile \
        config/config.guess config/config.sub config/install-sh \
        config/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
depcomp =
am__depfiles_maybe =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
        html-recursive info-recursive install-data-recursive \
        install-exec-recursive install-info-recursive \
        install-recursive installcheck-recursive installdirs-recursive \
        pdf-recursive ps-recursive uninstall-info-recursive \
        uninstall-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = libedit utils src
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
  { test ! -d $(distdir) \
    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
         && rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = ${SHELL} /usr/local/sac/config/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /usr/local/sac/config/missing --run tar
AUTOCONF = ${SHELL} /usr/local/sac/config/missing --run autoconf
AUTOHEADER = ${SHELL} /usr/local/sac/config/missing --run autoheader
AUTOMAKE = ${SHELL} /usr/local/sac/config/missing --run automake-1.9
AWK = gawk
BINARY_DIST = linux_x86_64
CC = gcc
CCDEPMODE = depmode=none
CFLAGS = -m32
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
CYGWIN_SYSTEM_FALSE =
CYGWIN_SYSTEM_TRUE = #
DATABASE_FALSE =
DATABASE_TRUE = #
DEBUG =
DEFS = -DPACKAGE_NAME=\"Seismic\ Analysis\ Code\" -DPACKAGE_TARNAME=\"sac\" -DPACKAGE_VERSION=\"101.1\" -DPACKAGE_STRING=\"Seismic\ Analysis\ Code\ 101.1\" -DPACKAGE_BUGREPORT=\"sac-help@iris.washington.edu\" -DLINUX=1 -DREADLINE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DUSE_X11_DOUBLE_BUFFER=1 -DUSE_X11_MULTIPLE_DEPTHS=1 -DDATABASE_DISABLED=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DBUILD_DATE=\"09/03/2008\"
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EDITLINE_FALSE = #
EDITLINE_TRUE =
EGREP = /bin/grep -E
EXEEXT =
GREP = /bin/grep
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS = -m32
LIBOBJS =
LIBS = -ldl -lm -lncurses
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /usr/local/sac/config/missing --run makeinfo
OBJEXT = o
OPTIM =
PACKAGE = sac
PACKAGE_BUGREPORT = sac-help@iris.washington.edu
PACKAGE_NAME = Seismic Analysis Code
PACKAGE_STRING = Seismic Analysis Code 101.1
PACKAGE_TARNAME = sac
PACKAGE_VERSION = 101.1
PATH_SEPARATOR = :
RANLIB = ranlib
READLINE_FALSE =
READLINE_TRUE = #
SED = /bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 101.1
XMKMF =
X_CFLAGS =
X_EXTRA_LIBS =
X_LIBS =  -L/usr/lib64
X_PRE_LIBS =
ac_ct_CC = gcc
am__fastdepCC_FALSE =
am__fastdepCC_TRUE = #
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias =
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias =
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = /usr/local/sac/config/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local/sac
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target = x86_64-unknown-linux-gnu
target_alias =
target_cpu = x86_64
target_os = linux-gnu
target_vendor = unknown

# Do not create dependencies while compiling
AUTOMAKE_OPTIONS = no-dependencies

# Subdirectories to MAKE recursively
SUBDIRS = $(am__append_1) utils src
SACAUX_WIN = winaux
SACAUX_UNIX = aux
SACAUX_DIR = $(SACAUX_UNIX)
#SACAUX_DIR = $(SACAUX_WIN)

# Extra Subdirectories/Files to include within a distribution
#EXTRA_DIST       = libedit aux inc macros src bin lib \
#                   Changes Editline.license History License \
#                   Readme Readme.buildsac
EXTRA_DIST = Changes Editline.license History License \
                    Readme Readme.buildsac \
                    bin inc lib macros $(SACAUX_DIR)


# Extra Subdirectories/Files to install
EXTRA_INSTALL = macros Changes Editline.license History License Readme \
                   utils/saclst.c utils/sacswap.c utils/sgftops.c utils/sac.h \
                   utils/Makefile.utils \
                   $(SACAUX_DIR)

bin_SCRIPTS = bin/sacinit.sh \
              bin/sacinit.csh \
              bin/sgftoeps.csh \
              bin/sgftox.csh

CLEANFILES = bin/sacinit.sh bin/sacinit.csh
all: all-recursive

.SUFFIXES:
am--refresh:
        @:
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
              echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
              cd $(srcdir) && $(AUTOMAKE) --foreign  \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  Makefile'; \
        cd $(top_srcdir) && \
          $(AUTOMAKE) --foreign  Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
            echo ' $(SHELL) ./config.status'; \
            $(SHELL) ./config.status;; \
          *) \
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
        esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
        $(SHELL) ./config.status --recheck

$(top_srcdir)/configure:  $(am__configure_deps)
        cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          if test -f $$d$$p; then \
            f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
            echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
            $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
          else :; fi; \
        done

uninstall-binSCRIPTS:
        @$(NORMAL_UNINSTALL)
        @list='$(bin_SCRIPTS)'; for p in $$list; do \
          f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
          rm -f "$(DESTDIR)$(bindir)/$$f"; \
        done
uninstall-info-am:

# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
#     (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
        @failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
            *k*) failcom='fail=yes';; \
          esac; \
        done; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            dot_seen=yes; \
            local_target="$$target-am"; \
          else \
            local_target="$$target"; \
          fi; \
          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done; \
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"

mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
        @failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
            *k*) failcom='fail=yes';; \
          esac; \
        done; \
        dot_seen=no; \
        case "$@" in \
          distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
          *) list='$(SUBDIRS)' ;; \
        esac; \
        rev=''; for subdir in $$list; do \
          if test "$$subdir" = "."; then :; else \
            rev="$$subdir $$rev"; \
          fi; \
        done; \
        rev="$$rev ."; \
        target=`echo $@ | sed s/-recursive//`; \
        for subdir in $$rev; do \
          echo "Making $$target in $$subdir"; \
          if test "$$subdir" = "."; then \
            local_target="$$target-am"; \
          else \
            local_target="$$target"; \
          fi; \
          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
          || eval $$failcom; \
        done && test -z "$$fail"
tags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
        done
ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        mkid -fID $$unique
tags: TAGS

TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
          include_option=--etags-include; \
          empty_fix=.; \
        else \
          include_option=--include; \
          empty_fix=; \
        fi; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test ! -f $$subdir/TAGS || \
              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
          fi; \
        done; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
          test -n "$$unique" || unique=$$empty_fix; \
          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
            $$tags $$unique; \
        fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
                $(TAGS_FILES) $(LISP)
        tags=; \
        here=`pwd`; \
        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
        unique=`for i in $$list; do \
            if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
          done | \
          $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(CTAGS_ARGS)$$tags$$unique" \
          || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
             $$tags $$unique

GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
          && cd $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) $$here

distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
16 [报告]
发表于 2008-09-03 14:07 |只看该作者
原帖由 letwave 于 2008-9-3 13:55 发表
安装了32bit version on 64 bit platform.之后这个地方通过了,但是在链接库是出错了,
说/usr/bin/ld:cannot find -lX11
我是指定了X11库的位置在/usr/lib64的呢,为啥出错呢?

首先,你的系统上有 libX11 么?其次,也许它需要的是 32-bit 的 libX11 库。

论坛徽章:
0
17 [报告]
发表于 2008-09-03 14:18 |只看该作者

回复 #16 MMMIX 的帖子

哈哈,我机器上有libX11, 果然还是需要32bit的libX11库,谢谢哈,再次感谢。成功了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP