免费注册 查看新帖 |

Chinaunix

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

Gcc后续篇----make出问题了 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-06-28 11:44 |只看该作者
原帖由 phpasp 于 2006-6-28 09:17 发表
试下这个
ln -s /usr/local/bin/gcc /usr/bin/cc


谢谢您,刚试过,无变化!

论坛徽章:
0
12 [报告]
发表于 2006-06-28 12:33 |只看该作者
原帖由 chenlie39 于 2006-6-28 11:44 发表


谢谢您,刚试过,无变化!


这种错误和cc没有太大的关系。主要是include文件和相应的库没有完全一一对应或者多次包含的原因。

/usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:292: error: parse error before '}' token
/usr/include/sys/siginfo.h:294: error: parse error before '}' token
/usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
无法解析ctid_t类型结构,可能使用的siginfo.h不能使用该位置的该文件

/usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
/usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'

/usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
/usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'

/usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
/usr/include/sys/siginfo.h:273: error: previous declaration of `__file'

/usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
/usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'

/usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
/usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'

以上冲突是由于两个头文件中均包含指定的类型,从而编译器不知道该如何取舍。

/usr/include/sys/siginfo.h:426: error: parse error before '}' token
/usr/include/sys/siginfo.h:428: error: parse error before '}' token
/usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
/usr/include/sys/siginfo.h:437: error: parse error before '}' token
In file included from /usr/include/sys/procset.h:24,
                 from /usr/include/sys/wait.h:25,
                 from include/apr.h:131,
                 from include/apr_pools.h:37,
                 from /opt/down/httpd-2.2.2/srclib/apr/include/arch/apr_private_common.h:24,
                 from /opt/down/httpd-2.2.2/srclib/apr/include/arch/unix/apr_private.h:779,
                 from passwd/apr_getpass.c:22:
/usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
In file included from include/apr.h:131,
                 from include/apr_pools.h:37,
                 from /opt/down/httpd-2.2.2/srclib/apr/include/arch/apr_private_common.h:24,
                 from /opt/down/httpd-2.2.2/srclib/apr/include/arch/unix/apr_private.h:779,
                 from passwd/apr_getpass.c:22:
/usr/include/sys/wait.h:86: error: parse error before "siginfo_t"
In file included from include/apr_general.h:33,
                 from include/apr_pools.h:39,
                 from /opt/down/httpd-2.2.2/srclib/apr/include/arch/apr_private_common.h:24,
                 from /opt/down/httpd-2.2.2/srclib/apr/include/arch/unix/apr_private.h:779,
                 from passwd/apr_getpass.c:22:
/usr/include/signal.h:111: error: parse error before "siginfo_t"
/usr/include/signal.h:113: error: parse error before "siginfo_t"
*** Error code 1
make: Fatal error: Command failed for target `passwd/apr_getpass.lo'
Current working directory /opt/down/httpd-2.2.2/srclib/apr
*** Error code 1

这种问题的最好的解决办法是详细阅读你下载的源代码的readme.txt,了解你的平台(是Linux?BSD?Solaris?...),然后选择相应的Makefile(如Makefile.lin,Makefile或者其他)和编译器

如果实在不好办,就安装Sun Studio 11,导入源代码,重新创建Makefile(可选择gun版本还是Sun Solaris版本)

论坛徽章:
0
13 [报告]
发表于 2006-06-28 14:53 |只看该作者
你这个跟MAKE没有任何关系,这是编译APACHE时常遇到的问题,因为你的头文件不匹配所以造成不能正常MAKE,你必须要先装APR然后再编译安装APR-UTIL,然后在编译APACHE的时候指定APR-UTIL的安装位置,他会自动去寻找APR-UTIL的INCLUDE和LIB,这样就能正常MAKE

论坛徽章:
0
14 [报告]
发表于 2006-06-29 10:33 |只看该作者
以下是APACHE2.2.2的README文档,看过后没发现重要信息(可能与我英文能力有关)

                          Apache HTTP Server

  What is it?
  -----------

  The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliant
  web server.  Originally designed as a replacement for the NCSA HTTP
  Server, it has grown to be the most popular web server on the
  Internet.  As a project of the Apache Software Foundation, the
  developers aim to collaboratively develop and maintain a robust,
  commercial-grade, standards-based server with freely available
  source code.

  The Latest Version
  ------------------

  Details of the latest version can be found on the Apache HTTP
  server project page under <http://httpd.apache.org/>.

  Documentation
  -------------

  The documentation available as of the date of this release is
  included in HTML format in the docs/manual/ directory.  The most
  up-to-date documentation for the 2.2.x releases can be found at
  <http://httpd.apache.org/docs-2.2/>.

  Installation
  ------------

  Please see the file called INSTALL.  Platform specific notes can be
  found in README.platforms.

  Licensing
  ---------

  Please see the file called LICENSE.

  Contacts
  --------

     o If you want to be informed about new code releases, bug fixes,
       security fixes, general news and information about the Apache server
       subscribe to the apache-announce mailing list as described under
       <http://httpd.apache.org/lists.html#http-announce>

     o If you want freely available support for running Apache please join the
       Apache user community by subscribing to Users Mailing List at
       <http://httpd.apache.org/userslist.html> or one of the following
       USENET newsgroups:
         comp.infosystems.www.servers.unix
         comp.infosystems.www.servers.ms-windows
       Also available at:
         <http://groups.google.com/groups? ... systems.www.servers>

     o If you want commercial support for running Apache please contact
       one of the companies and contractors which are listed at
       <http://www.apache.org/info/support.cgi>

     o If you have a concrete bug report for Apache please go to the
       Apache Group Bug Database and submit your report:
       <http://httpd.apache.org/bug_report.html>

     o If you want to participate in actively developing Apache please
       subscribe to the `dev@httpd.apache.org' mailing list as described at
       <http://httpd.apache.org/lists.html#http-dev>

  Acknowledgments
  ----------------

  We wish to acknowledge the following copyrighted works that
  make up portions of the Apache software:

  Portions of this software were developed at the National Center
  for Supercomputing Applications (NCSA) at the University of
  Illinois at Urbana-Champaign.

  This software contains code derived from the RSA Data Security
  Inc. MD5 Message-Digest Algorithm, including various
  modifications by Spyglass Inc., Carnegie Mellon University, and
  Bell Communications Research, Inc (Bellcore).

  Regular expression support is provided by the PCRE library package, which
  is open source software, written by Philip Hazel, and copyright by the
  University of Cambridge, England.  The original software is available from
     ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

  Apache 2 relies heavily on the use of autoconf and libtool to provide
  a build environment.
#

论坛徽章:
0
15 [报告]
发表于 2006-06-29 10:38 |只看该作者
以下为APACHE2.2.2内INSTALL文档

# cat INSTALL

  APACHE INSTALLATION OVERVIEW

  Quick Start - Unix
  ------------------

  For complete installation documentation, see [ht]docs/manual/install.html or
  http://httpd.apache.org/docs-2.2/install.html

     $ ./configure --prefix=PREFIX
     $ make
     $ make install
     $ PREFIX/bin/apachectl start

     NOTES: * Replace PREFIX with the filesystem path under which
              Apache should be installed.  A typical installation
              might use "/usr/local/apache2" for PREFIX (without the
              quotes).

            * If you are building on FreeBSD, be aware that threads will
              be disabled and the prefork MPM will be used by default,
              as threads do not work well with Apache on FreeBSD.  If
              you wish to try a threaded Apache on FreeBSD anyway, use
              "./configure --enable-threads".

            * If you are building on Mac OS X (Darwin), make sure to
              use libtool 1.4.2 or newer.

            * If you are a developer building Apache directly from CVS,
              you will need to run ./buildconf before running configure.

  For a short impression of what possibilities you have, here is a
  typical example which configures Apache for the installation tree
  /sw/pkg/apache with a particular compiler and flags plus the two
  additional modules mod_rewrite and mod_speling for later loading
  through the DSO mechanism:

     $ CC="pgcc" CFLAGS="-O2" \
     ./configure --prefix=/sw/pkg/apache \
     --enable-rewrite=shared \
     --enable-speling=shared

  The easiest way to find all of the configuration flags for Apache 2.2
  is to run ./configure --help.


  Quick Start - Windows
  ---------------------

  For complete documentation, see [ht]docs/manual/platform/windows.html or
  http://httpd.apache.org/docs-2.2/platform/windows.html.

  The Apache/Win32 binaries are primarily distributed as a Windows Installer
  package (.msi), and may be available as a .zip file as well.  These packages
  are named apache-2.2.xx-win32-x86.msi and apache-2.2.xx-win32-x86.zip.
  Please choose the .msi package if at all possible.

  If you have unpacked a source distribution (named httpd-2.2-xx.zip, without
  any -win32-x86 notation) you must compile the package yourself, see the links
  mentioned above.  Unless you intended to do this, please look again for the
  binary package from http://www.apache.org/dist/httpd/binaries/win32/ and
  install that .msi (or .zip package, if you must.)

  If you have unpacked this binary distribution from the .zip package, you
  _must_ edit the conf/httpd.conf file (with notepad or another text editor)
  to reflect the correct ServerName, Domain, and directory paths.  Search for
  the text "@@" to discover what you must edit.  To install and start the
  service after you have corrected the httpd.conf file, use the command

    bin\Apache -k install
    bin\Apache -k start

  The .msi package configures the httpd.conf file, and installs and starts
  the Apache2 service for you.  It also installs plenty of useful shortcuts
  and the taskbar ApacheMonitor.  We strongly encourage you to use it.


  Postscript
  ----------

  The Apache HTTP Server group cannot field user's installation questions.
  There are many valuable forums to help you get started.  Please refer your
  questions to the appropriate forum, such as the Users Mailing List at
  http://httpd.apache.org/userslist.html or the usenet newsgroups
  comp.infosystems.www.servers.unix or
  comp.infosystems.www.servers.ms-windows.

  Thanks for using the Apache HTTP Server, version 2.2.

                                     The Apache Software Foundation
                                     http://www.apache.org/
#

论坛徽章:
0
16 [报告]
发表于 2006-06-29 10:39 |只看该作者
以下文./configure --help内容  (看这头痛    )
# ./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local/apache2]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/apache2/bin', `/usr/local/apache2/lib' etc.  You can specify
an installation prefix other than `/usr/local/apache2' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  --target=TARGET   configure for building compilers for TARGET [HOST]

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-layout=LAYOUT
  --enable-v4-mapped      Allow IPv6 sockets to handle IPv4 connections
  --enable-exception-hook Enable fatal exception hook
  --enable-maintainer-mode
                          Turn on debugging and compile time warnings
  --enable-pie            Build httpd as a Position Independent Executable
  --enable-modules=MODULE-LIST
                          Space-separated list of modules to enable | "all" |
                          "most"
  --enable-mods-shared=MODULE-LIST
                          Space-separated list of shared modules to enable |
                          "all" | "most"
  --disable-authn-file    file-based authentication control
  --enable-authn-dbm      DBM-based authentication control
  --enable-authn-anon     anonymous user authentication control
  --enable-authn-dbd      SQL-based authentication control
  --disable-authn-default authentication backstopper
  --enable-authn-alias    auth provider alias
  --disable-authz-host    host-based authorization control
  --disable-authz-groupfile
                          'require group' authorization control
  --disable-authz-user    'require user' authorization control
  --enable-authz-dbm      DBM-based authorization control
  --enable-authz-owner    'require file-owner' authorization control
  --enable-authnz-ldap    LDAP based authentication
  --disable-authz-default authorization control backstopper
  --disable-auth-basic    basic authentication
  --enable-auth-digest    RFC2617 Digest authentication
  --enable-isapi          isapi extension support
  --enable-file-cache     File cache
  --enable-cache          dynamic file caching
  --enable-disk-cache     disk caching module
  --enable-mem-cache      memory caching module
  --enable-dbd            Apache DBD Framework
  --enable-bucketeer      buckets manipulation filter
  --enable-dumpio         I/O dump filter
  --enable-echo           ECHO server
  --enable-example        example and demo module
  --enable-case-filter    example uppercase conversion filter
  --enable-case-filter-in example uppercase conversion input filter
  --enable-ext-filter     external filter module
  --disable-include       Server Side Includes
  --disable-filter        Smart Filtering
  --disable-charset-lite  character set translation
  --enable-charset-lite   character set translation
  --enable-deflate        Deflate transfer encoding support
  --enable-ldap           LDAP caching and connection pooling services
  --disable-log-config    logging configuration
  --enable-log-forensic   forensic logging
  --enable-logio          input and output logging
  --disable-env           clearing/setting of ENV vars
  --enable-mime-magic     automagically determining MIME type
  --enable-cern-meta      CERN-type meta files
  --enable-expires        Expires header control
  --enable-headers        HTTP header control
  --enable-ident          RFC 1413 identity check
  --enable-usertrack      user-session tracking
  --enable-unique-id      per-request unique ids
  --disable-setenvif      basing ENV vars on headers
  --enable-version        determining httpd version in config files
  --enable-proxy          Apache proxy module
  --enable-proxy-connect  Apache proxy CONNECT module
  --enable-proxy-ftp      Apache proxy FTP module
  --enable-proxy-http     Apache proxy HTTP module
  --enable-proxy-ajp      Apache proxy AJP module
  --enable-proxy-balancer Apache proxy BALANCER module
  --enable-ssl            SSL/TLS support (mod_ssl)
  --enable-distcache      Select distcache support in mod_ssl
  --enable-optional-hook-export
                          example optional hook exporter
  --enable-optional-hook-import
                          example optional hook importer
  --enable-optional-fn-import
                          example optional function importer
  --enable-optional-fn-export
                          example optional function exporter
  --enable-static-support Build a statically linked version of the support
                          binaries
  --enable-static-htpasswd
                          Build a statically linked version of htpasswd
  --enable-static-htdigest
                          Build a statically linked version of htdigest
  --enable-static-rotatelogs
                          Build a statically linked version of rotatelogs
  --enable-static-logresolve
                          Build a statically linked version of logresolve
  --enable-static-htdbm   Build a statically linked version of htdbm
  --enable-static-ab      Build a statically linked version of ab
  --enable-static-checkgid
                          Build a statically linked version of checkgid
  --enable-http           HTTP protocol handling
  --disable-mime          mapping of file-extension to MIME
  --enable-dav            WebDAV protocol handling
  --disable-status        process/thread monitoring
  --disable-autoindex     directory listing
  --disable-asis          as-is filetypes
  --enable-info           server information
  --enable-suexec         set uid and gid for spawned processes
  --disable-cgid          CGI scripts
  --enable-cgi            CGI scripts
  --disable-cgi           CGI scripts
  --enable-cgid           CGI scripts
  --enable-dav-fs         DAV provider for the filesystem
  --enable-dav-lock       DAV provider for generic locking
  --enable-vhost-alias    mass virtual hosting module
  --disable-negotiation   content negotiation
  --disable-dir           directory request handling
  --enable-imagemap       server-side imagemaps
  --disable-actions       Action triggering on requests
  --enable-speling        correct common URL misspellings
  --disable-userdir       mapping of requests to user-specific directories
  --disable-alias         mapping of requests to different filesystem parts
  --enable-rewrite        rule based URL manipulation
  --enable-so             DSO capability

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-apr=PATH         prefix for installed APR, path to APR build tree,
                          or the full path to apr-config
  --with-apr-util=PATH    prefix for installed APU, path to APU build tree,
                          or the full path to apu-config
  --with-pcre=PATH        Use external PCRE library
  --with-port=PORT        Port on which to listen (default is 80)
  --with-z=DIR            use a specific zlib library
  --with-sslc=DIR         RSA SSL-C SSL/TLS toolkit
  --with-ssl=DIR          OpenSSL SSL/TLS toolkit
  --with-mpm=MPM          Choose the process model for Apache to use.
                          MPM={beos|event|worker|prefork|mpmt_os2}
  --with-module=module-type:module-file
                          Enable module-file in the modules/<module-type>
                          directory.
  --with-program-name     alternate executable name
  --with-suexec-bin       Path to suexec binary
  --with-suexec-caller    User allowed to call SuExec
  --with-suexec-userdir   User subdirectory
  --with-suexec-docroot   SuExec root directory
  --with-suexec-uidmin    Minimal allowed UID
  --with-suexec-gidmin    Minimal allowed GID
  --with-suexec-logfile   Set the logfile
  --with-suexec-safepath  Set the safepath
  --with-suexec-umask     umask for suexec'd process

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

#

论坛徽章:
0
17 [报告]
发表于 2006-06-29 11:26 |只看该作者
原帖由 sunadmin 于 2006-6-28 14:53 发表
你这个跟MAKE没有任何关系,这是编译APACHE时常遇到的问题,因为你的头文件不匹配所以造成不能正常MAKE,你必须要先装APR然后再编译安装APR-UTIL,然后在编译APACHE的时候指定APR-UTIL的安装位置,他会自动去寻找 ...



请问你所说的APR我系统里面有,请看我在
# ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking target system type... i386-pc-solaris2.10

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking target system type... i386-pc-solaris2.10
Configuring APR library
Platform: i386-pc-solaris2.10
checking for working mkdir -p... yes
APR Version: 1.2.7
checking for chosen layout... apr
checking for gcc... gcc
.
..
...


您回帖时候提到的APR-UTIL  我安装了 aprutil-1.2.2-sol10-x86-local.gz请问安装的对吗?

如何编译APACHE的时候指定APR-UTIL的安装位置???

论坛徽章:
0
18 [报告]
发表于 2006-06-29 16:55 |只看该作者
我重新装了一下系统, 直接用solaris10 其他文件夹下面的gcc与 make。
运行./configure 正常。
运行make ,系统编译了好些文件,然后才出现下面的问题:
Current working directory /down/httpd-2.2.2/srclib
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' srclib os server modules support'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd '; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'

论坛徽章:
0
19 [报告]
发表于 2006-07-01 15:53 |只看该作者
没人回答了。。。郁闷。

论坛徽章:
0
20 [报告]
发表于 2006-07-02 07:32 |只看该作者
把你的问题放到 CU-Web服务器 上吧。
http://bbs.chinaunix.net/forumdisplay.php?fid=13
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP