This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [Cygwin] some random build breaks


> Can you please try the attached patch to see if it fixes things, and let 

I will try the patch later. For now I'm using -disable-shared and I'll see how things go.

How things go -- pretty good now: 
 cygwin native built and installed 
 cygwin hosted, sparc-solaris target built and installed 
 cygwin build, sparc-solaris host and target failed, probably due to configure CC='ccache gcc' and then it used the wrong compiler. 
   Trying again without specifying CC. 
  After more success I an go back and try replacing my workaround (-disable-shared) with your patch.
   -disable-shared does workaround a sparc64-solaris problem too, at least with gcc 4.3.2 + binutils 2.18.

 What is usual practise btw? I have this question about a few things, but one is, people are using
binutils 2.18, or current cvs binutils? "People" being "gcc developers".

I also wonder about how people achieve the "overlay".

My current way is like so (please pardon the Python...)

if ("gccrel" in sys.argv) == ("gccsvn" in sys.argv):
    print("ERROR: must specify either gccrel or gccsvn")
    sys.exit(1)

if "gccrel" in sys.argv:
    Source = "/src/gccrel"

if "gccsvn" in sys.argv:
    Source = "/src/gccsvn"

if "cygwin" in sys.argv:
    Extract(Source, Source + "/winsup", "/net/distfiles/" + "cygwin-src-20080912")

if "binutils" in sys.argv:
    Extract(Source, Source + "/binutils", "/net/distfiles/" + "binutils-2.18")

if "gccrel" in sys.argv:
    Extract(Source, Source + "/gcc", "/net/distfiles/" + "gcc-4.3.2")

if "gccsvn" in sys.argv:
    #
    # Where there is no overlap with binutils, use /d for perf.
    # Where is overlap with binutils, don't use /d for correctness.
    #
    Run(".", "xcopy /qeyid " + "/dev2/gcc /src/gccsvn".replace("/", "\\\\"))

    # non recursive at the root
    Run(".", "xcopy /qyi " + "/dev2/gcc /src/gccsvn".replace("/", "\\\\"))

    for a in ["libiberty", "config", "include", "intl"]:
        Run(".", "xcopy /qyi " + ("/dev2/gcc/" + a + " /src/gccsvn/" + a).replace("/", "\\\\"))

if "gmp" in sys.argv:
    Extract(Source + "/gmp", Source + "/gmp", "/net/distfiles/" + "gmp-4.2.3")
    Extract(Source + "/mpfr", Source + "/mpfr", "/net/distfiles/" + "mpfr-2.3.1")


There's this annoying thing where constructing and configuring a tree dominates
a lot of build stuff, in time and complexity.
It seems quite difficult to just get the source, configure once, and iterate very incrementally.
There are too many configuration variables.
  Switching ccache off and on should be cheap. That I want to use it shouldn't be
   strewn through all the configured makefiles. I think.
The cost of editing a makefile is too high -- having to reconfigure. I think.
I'm constantly redoing things slowly from scratch.
Given that I just leave things running and go to work and this isn't a job, ok.
But I don't know how people are productive in this environment.
Partly this is FUD. I don't know what I'm doing so I play it safe.
Ultimately I would like to very turnkey/automatic churn out a bunch of configurations.
Success rate of a mere configure and build, if doing all languages, and not just native, seems low.
Yeah, I'm currently targeting wierdo cygwin and solaris, haven't yet targeted mainstream x86 Linux. :)


> Yes. This is a problem with libjava's autoconfigury.  
> HAVE_GETHOSTNAME_DECL should be defined, but for some reason isn't. If 

On the libjava part, yeah, it looks like the dreaded, "let's skip doing things automatically and instead
assume we know the truth but we don't"..:

if test "x${with_newlib}" = "xyes"; then
   # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
   # may not work correctly, because the compiler may not be able to
   # link executables.

   # We assume newlib.  This lets us hard-code the functions we know
   # we'll have.
   AC_DEFINE(HAVE_MEMMOVE, 1, [Define if you have memmove.])
   AC_DEFINE(HAVE_MEMCPY, 1, [Define if you have memcpy.])
   AC_DEFINE(HAVE_TIME, 1, [Define if you have time.])
   AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function])
   AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have the 'localtime_r' function.])
   AC_DEFINE(HAVE_USLEEP_DECL, 1, [Define if usleep is declared in .])
   # This is only for POSIX threads.
   AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.])

   # Assume we do not have getuid and friends.
   AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.])
   PLATFORMNET=NoNet
else
   AC_CHECK_FUNCS([strerror_r select fstat open fsync sleep opendir \
                   localtime_r getpwuid_r getcwd \
  ... 


So it doesn't try to figure things out, just seems to assume the wrong thing.
This is not even building a cross compiler.
I specified no build/host/target, just building native cygwin.
  Maybe native cygwin is unusual, in that newlib is usually embedded and therefore cross?
  I guess. And embedded folks don't use Java?? At least not gcc's Java?

This is gcc 4.3.2, but gccsvn looks about the same -- at least libjava/configure.ac does.

Configure line was:

  $ /src/gcc/configure -disable-nls STAGE_CC_WRAPPER=ccache -prefix=/usr/local -
exec-prefix=/usr/local -libdir=/usr/local/lib -libexecdir=/usr/local/lib -mandir
=/usr/local/share/man -infodir=/usr/local/share/info -enable-languages=c,c++,for
tran,java,objc,obj-c++ -disable-nls -without-included-gettext -enable-version-sp
ecific-runtime-libs -without-x -enable-libgcj -disable-java-awt -with-system-zli
b -enable-interpreter -disable-libgcj-debug -enable-threads=posix -enable-java-g
c=boehm -disable-win32-registry -enable-sjlj-exceptions -enable-hash-synchroniza
tion -enable-libstdcxx-debug



Thanks and sorry for the attitude,
 - Jay

> Date: Sun, 14 Sep 2008 16:28:55 -0500
> From: aaron@
> To: jay@
> CC: gcc@
> Subject: Re: [Cygwin] some random build breaks
>
> Jay wrote:
>
>> Creating library file: ./shlib/libgcc_s.a.tmp
>> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: warning: ca
>> nnot find entry symbol __cygwin_dll_entry@12; defaulting to 10001000
>> _absvsi2_s.o: In function `__absvsi2':
>> /src/gccsvn/libgcc/../gcc/libgcc2.c:237: undefined reference to `_abort'
> ...
>> collect2: ld returned 1 exit status
>> make[1]: *** [libgcc_s.dll] Error 1
>
> Can you please try the attached patch to see if it fixes things, and let
> me know the result? Thanks in advance.
>
>
>> java/net/natVMInetAddress.cc:42: error: declaration of C function 'int gethostna
>> me(char*, int)' conflicts with
>> /src/gcc/newlib/libc/include/sys/unistd.h:227: error: previous declaration 'int
>> gethostname(char*, size_t)' here
> ...
>> Probably the right fix here is some configury to look for the declaration of gethostname
>> and if it is found, be sure to #include where it is found, and not declare it one's self?
>
> Yes. This is a problem with libjava's autoconfigury.
> HAVE_GETHOSTNAME_DECL should be defined, but for some reason isn't. If
> you examine the configury files in libjava/ such as config.log,
> configure, and configure.ac, you probably will find some clues regarding
> whats happening here.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]