* compiling X with ccc
@ 2002-03-11 19:43 Peter Petrakis
2002-03-11 22:24 ` error logs " Peter Petrakis
0 siblings, 1 reply; 14+ messages in thread
From: Peter Petrakis @ 2002-03-11 19:43 UTC (permalink / raw)
To: 'Axp-List
I have had partial success with this in the past but the contortions
I had to go through to get it past the point of where it failed
was down right midevil. basicly there is a single tool that
fails to build before you even get to the actual X sources. I don't remember
how I worked around it but it wasnt easy :-) and I never did achieve a
successfull
clean compile with ccc. I had unresolved symbols that had no business being
unresolved like printf. The errors messages for when that ancient tool
failed to compile where indecipherable to me at the time (6+ months ago). If
anyone wants to take a crack at it simply change the HOSTCC (i think thats
it) option in the host.def file to ccc and let it run. It will fail rather
quickly. Those of you who
are unfamiliar with compiling X from scratch I recommend that you take a
look at the nice spec files that Mike has in his personal RPMS and the DRI
project has a nice little tutorial. ftp://people.redhat.com/mharris/ and
http://dri.sourceforge.net/doc/DRIcompile.html respectivly.
Peter
--
www.linuxalpha.org www.alphadriven.org
Peter Petrakis Warrior/Engineer voodoo@alphadriven.org
"<BLAM!!> Who the hell are you!? Name's Ash <click clock> Housewares..."
^ permalink raw reply [flat|nested] 14+ messages in thread
* error logs RE: compiling X with ccc
2002-03-11 19:43 compiling X with ccc Peter Petrakis
@ 2002-03-11 22:24 ` Peter Petrakis
2002-03-11 23:30 ` Uncle George
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Peter Petrakis @ 2002-03-11 22:24 UTC (permalink / raw)
To: axp-list
It fails compiling imake of all things . I suppose the default CC settings
need to be tuned specificly for ccc. First, my host.def file, next the
actual error message.
I can take that same command and substitute gcc for ccc and it will compile
fine.
I am unfamilar with linker errors and the flags that correct that furthmore
I am baffeled why ccc choses to ignore the include files. Any ideas?
Peter
#define UseCompaqMathLibrary YES
#define CcCmd ccc
#define DefaultGcc2AxpOpt -O0 -g -mcpu=ev6
#define DefaultGcc2PpcOpt -O2 -mcpu=750
#define DefaultGcc2i386Opt -O2
#if defined(AlphaArchitecture)
# define LibraryCDebugFlags -O0 -g -mcpu=ev6
#elif defined(PpcArchitecture)
# define LibraryCDebugFlags -O2 -mcpu=750
#else
# define LibraryCDebugFlags -O0 -g
#endif
#define BuildXFree86ConfigTools NO
/* #define XF86CardDrivers tdfx i810 mga ati glint vga */
#define XF86CardDrivers mga
#define DriDrivers ffb mga radeon mach64
#define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wnested-externs
#define DefaultCCOptions -ansi GccWarningOptions -pipe -g
#define NormalLibGlx NO
#define BuildXF86DRI YES
/* To do profiling of the dynamically loaded 'xyz_dri.so' object, turn
* this on.
* Use 'xc/lib/GL/makeprofile.sh' to make it work.
*/
/* #define GlxSoProf YES */
#ifdef GlxSoProf
# undef DefaultCCOptions
# define DefaultCCOptions -ansi GccWarningOptions -pipe -g -p
#endif
/* Optionally turn these on for debugging */
/* #define GlxBuiltInTdfx YES */
/* #define GlxBuiltInI810 YES */
/* #define GlxBuiltInMga YES */
/* #define GlxBuiltInR128 YES */
/* #define GlxBuiltInRadeon YES */
/* #define DoLoadableServer NO */
/* Optionally turn this on to change the place where you install the build.
* Warning: trailing blanks will cause build failures.
*/
#define ProjectRoot /usr/X11R6-DRI
/* Optionally turn this on to force the kernel modules to build */
#define BuildXF86DRM YES
#define XF86AFB NO
#define XnestServer NO
#define XVirtualFramebufferServer NO
/*
* Don't change anything below or the build will fail.
*/
#define BuildServersOnly YES
#define BuildLibrariesForXServers NO
#define BuildLibrariesForConfigTools NO
#define BuildXIE NO
#define BuildPexExt NO
#define XprtServer NO
#define SharedLibFont NO
<!-- kaboom -->
ccc -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmissi
ng-prototypes -Wmissing-declarations -Wnested-externs -pipe -g -I../../inc
lude -I../../exports/include/X11 -I../.. -I../../exports/include -I/usr/X11
R6-DRI/include -Dlinux -D__alpha__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURC
E -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=
15 -DNARROWPROTO -DCPP_PROGRAM="\"/lib/cpp\"" -DHAS_MERGE_CONSTANTS=`if
ccc -fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1>
/dev/null; then echo 1; else echo 0; fi` -c -o imake.o imake.c
cc: Info: imake.c, line 1610: In this statement, the unsigned expression
"fwrite(...)" is being compared with an equality operator to a constant
whose value is negative. This might not be what you intended.
(questcompare1)
if (fwrite(buf, sizeof(char), cnt, fd) == -1)
------------^
cc: Info: imake.c, line 156: This top level include file appears to be
unused. (unusedtop)
#include "Xosdefs.h"
-^
cc: Info: imake.c, line 169: This top level include file appears to be
unused. (unusedtop)
#include <sys/types.h>
-^
cc: Info: imake.c, line 191: This top level include file appears to be
unused. (unusedtop)
#include <sys/stat.h>
-^
cc: Info: imake.c, line 230: This top level include file appears to be
unused. (unusedtop)
#include <stdlib.h>
-^
cc: Info: imake.c, line 259: This top level include file appears to be
unused. (unusedtop)
#include <stdio.h>
-^
rm -f imake
ccc -o
imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmis
sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
imake.o -Wl,-rpath-link,../../exports/lib
imake.o: In function `get_libc_version':
:1010: undefined reference to `alloca'
:1010: undefined reference to `alloca'
:1010: undefined reference to `alloca'
collect2: ld returned 1 exit status
make[2]: *** [imake] Error 1
make[2]: Leaving directory `/mnt/home/voodoo/Xfree/build/config/imake'
make[1]: *** [imake.bootstrap] Error 2
make[1]: Leaving directory `/mnt/home/voodoo/Xfree/build'
make: *** [World] Error 2
--
www.linuxalpha.org www.alphadriven.org
Peter Petrakis Warrior/Engineer voodoo@alphadriven.org
"<BLAM!!> Who the hell are you!? Name's Ash <click clock> Housewares..."
> -----Original Message-----
> From: axp-list-admin@redhat.com [mailto:axp-list-admin@redhat.com]On
> Behalf Of Peter Petrakis
> Sent: Monday, March 11, 2002 2:43 PM
> To: 'Axp-List
> Subject: compiling X with ccc
>
>
> I have had partial success with this in the past but the contortions
> I had to go through to get it past the point of where it failed
> was down right midevil. basicly there is a single tool that
> fails to build before you even get to the actual X sources. I
> don't remember
> how I worked around it but it wasnt easy :-) and I never did achieve a
> successfull
> clean compile with ccc. I had unresolved symbols that had no
> business being
> unresolved like printf. The errors messages for when that ancient tool
> failed to compile where indecipherable to me at the time (6+
> months ago). If
> anyone wants to take a crack at it simply change the HOSTCC (i think thats
> it) option in the host.def file to ccc and let it run. It will fail rather
> quickly. Those of you who
> are unfamiliar with compiling X from scratch I recommend that you take a
> look at the nice spec files that Mike has in his personal RPMS and the DRI
> project has a nice little tutorial. ftp://people.redhat.com/mharris/ and
> http://dri.sourceforge.net/doc/DRIcompile.html respectivly.
>
> Peter
> --
> www.linuxalpha.org www.alphadriven.org
> Peter Petrakis Warrior/Engineer voodoo@alphadriven.org
> "<BLAM!!> Who the hell are you!? Name's Ash <click clock> Housewares..."
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-11 22:24 ` error logs " Peter Petrakis
@ 2002-03-11 23:30 ` Uncle George
2002-03-12 0:24 ` Peter Petrakis
2002-03-12 0:23 ` W Bauske
2002-03-12 0:49 ` Michal Jaegermann
2 siblings, 1 reply; 14+ messages in thread
From: Uncle George @ 2002-03-11 23:30 UTC (permalink / raw)
To: axp-list
Although no errors in the compile of imake.c, but in these few log
lines, which looks like a ccc compile, appears in reality to be using
ccc to do a link-edit.
u'd probably get a better idea at why alloca is missing ( from the ccc
libraries? maybe ) is there was a -v to list out all the options passed
to the various ccc phases. In particular the /bin/ld switches that ccc
may/maynot know about. an then the possible solution would be to add
-lmalloc to this build
/gat
Peter Petrakis wrote:
>
> It fails compiling imake of all things . I suppose the default CC settings
> rm -f imake
> ccc -o
> imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmis
> sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
> imake.o -Wl,-rpath-link,../../exports/lib
> imake.o: In function `get_libc_version':
> :1010: undefined reference to `alloca'
> :1010: undefined reference to `alloca'
> :1010: undefined reference to `alloca'
> collect2: ld returned 1 exit status
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-11 22:24 ` error logs " Peter Petrakis
2002-03-11 23:30 ` Uncle George
@ 2002-03-12 0:23 ` W Bauske
2002-03-12 0:49 ` Michal Jaegermann
2 siblings, 0 replies; 14+ messages in thread
From: W Bauske @ 2002-03-12 0:23 UTC (permalink / raw)
To: axp-list
Peter Petrakis wrote:
>
> It fails compiling imake of all things . I suppose the default CC settings
> need to be tuned specificly for ccc. First, my host.def file, next the
> actual error message.
> I can take that same command and substitute gcc for ccc and it will compile
> fine.
> I am unfamilar with linker errors and the flags that correct that furthmore
> I am baffeled why ccc choses to ignore the include files. Any ideas?
>
Failed linking imake. Compile seems to have worked, but complaining.
That's an amazingly sparse link command below.
> rm -f imake
> ccc -o
> imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmis
> sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
> imake.o -Wl,-rpath-link,../../exports/lib
Look around for some definition that controls link libraries and start
adding libs.
The compiler is correct. fwrite() does not return a negative value.
It's zero or positive. Wonder what OS allows a negative value from
fwrite()?
Wes
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: error logs RE: compiling X with ccc
2002-03-11 23:30 ` Uncle George
@ 2002-03-12 0:24 ` Peter Petrakis
2002-03-12 1:25 ` Uncle George
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Peter Petrakis @ 2002-03-12 0:24 UTC (permalink / raw)
To: axp-list
> u'd probably get a better idea at why alloca is missing ( from the ccc
> libraries? maybe ) is there was a -v to list out all the options passed
I don't know honestly. I'm not that familiar with ccc nevermind the linker.
> to the various ccc phases. In particular the /bin/ld switches that ccc
> may/maynot know about. an then the possible solution would be to add
> -lmalloc to this build
There doesnt seem to be a -lmalloc on this system, Thats what ld claims. I
thought that functionality as in -lc?
voodoo@asterix:~/Xfree/build/config/imake > ccc -o
imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmis
sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
imake.o -Wl,-rpath-link,../../exports/lib -lmalloc -lc
/usr/bin/ld: cannot find -lmalloc
collect2: ld returned 1 exit status
Checkout what 'else' unresolved.
voodoo@asterix:~/Xfree/build/config/imake > nm imake.o
0000000000000688 T AddCppArg
00000000000005e8 T AddMakeArg
0000000000000e38 T CheckImakefileC
00000000000021d0 T CleanCppInput
000000000000273c T CleanCppOutput
0000000000002e60 T Emalloc
0000000000000b28 T FindImakefile
0000000000000008 B Imakefile
00000000000014f0 D ImakefileC
0000000000000c24 T LogFatal
0000000000000bf4 T LogFatalI
0000000000000ca8 T LogMsg
00000000000014e0 D Makefile
0000000000002b0c T ReadLine
0000000000000728 T SetOpts
0000000000002eb4 T Strdup
00000000000014e8 D Template
U __ctype_b
U __errno_location
U abort
U access
U alloca
00000000000003c8 T catch
0000000000000018 B cleanedImakefile
U close
0000000000000000 B cpp
0000000000000008 C cpp_argindex
0000000000000c08 D cpp_argv
0000000000001f9c T cppit
0000000000001dbc T define_os_defaults
0000000000000ff8 T doit
U dup2
U execvp
U exit
U fclose
U fdopen
U fflush
U fgetc
U fgets
U fileno
U fopen
U fork
U fprintf
U fread
U fscanf
U fseek
U fstat
U ftruncate
U fwrite
U getenv
0000000000000010 B haveImakefileC
000000000000040c T init
0000000000002810 T isempty
00000000000015a8 D libc_c
U lstat
0000000000000000 T main
0000000000000008 C make_argindex
0000000000000d98 D make_argv
000000000000219c T makeit
U malloc
U mkstemp
0000000000000f34 T optional_include
U pclose
U perror
U popen
0000000000000008 C program
U remove
00000000000014f8 D show
0000000000000dbc T showargs
0000000000000264 T showit
U signal
U snprintf
U sprintf
U sscanf
U stderr
U stdout
U strcat
U strcmp
U strcpy
U strerror
U strlen
U strncmp
U strstr
00000000000014d0 D tmpImakefile
00000000000014c8 D tmpMakefile
U uname
U ungetc
U unlink
0000000000000020 B verbose
U wait
0000000000000318 T wrapup
0000000000002dfc T writetmpfile
Peter
> Peter Petrakis wrote:
> >
> > It fails compiling imake of all things . I suppose the default
> CC settings
>
> > rm -f imake
> > ccc -o
> > imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith
> -Wstrict-prototypes -Wmis
> > sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
> > imake.o -Wl,-rpath-link,../../exports/lib
> > imake.o: In function `get_libc_version':
> > :1010: undefined reference to `alloca'
> > :1010: undefined reference to `alloca'
> > :1010: undefined reference to `alloca'
> > collect2: ld returned 1 exit status
>
>
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-11 22:24 ` error logs " Peter Petrakis
2002-03-11 23:30 ` Uncle George
2002-03-12 0:23 ` W Bauske
@ 2002-03-12 0:49 ` Michal Jaegermann
2002-03-12 1:33 ` yeah baby :-) " Peter Petrakis
2 siblings, 1 reply; 14+ messages in thread
From: Michal Jaegermann @ 2002-03-12 0:49 UTC (permalink / raw)
To: axp-list
On Mon, Mar 11, 2002 at 05:24:27PM -0500, Peter Petrakis wrote:
> cc: Info: imake.c, line 1610: In this statement, the unsigned expression
> "fwrite(...)" is being compared with an equality operator to a constant
> whose value is negative. This might not be what you intended.
> (questcompare1)
> if (fwrite(buf, sizeof(char), cnt, fd) == -1)
> ------------^
Picky, picky! But C compiler is supposed to do a type promotion.
'fwrite' indeed has a return type size_t so you can do
if (fwrite(buf, sizeof(char), cnt, fd) == (size_t)(-1))
if you want to avoid this whining.
> cc: Info: imake.c, line 259: This top level include file appears to be
> unused. (unusedtop)
> #include <stdio.h>
> -^
This is weird. So from where they picked up a declartion of 'fwrite'?
It _should_ be in <stdio.h>. Anyway, this is a compiler
overenthusiastic on warnings and format of these is a gret PITA if
you work from Unix editors and want a help with positioning your cursor.
> imake.o: In function `get_libc_version':
> :1010: undefined reference to `alloca'
> :1010: undefined reference to `alloca'
> :1010: undefined reference to `alloca'
'make -Dalloca=malloc' or add this define to your compilation flags.
This will create leaks so if ccc _really_ does not provide 'alloca'
(this is really a compiler dependent as this is an allocation on stack
but carefuly check ccc docs) then for anything running longer, like X,
you will have to fix sources. Great fun as that means that you have to
track every possible way to exit callers.
'alloca()' is faster, and quietly frees your memory, although it allows
you to mess up your stack quite effectively. :-)
Michal
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-12 0:24 ` Peter Petrakis
@ 2002-03-12 1:25 ` Uncle George
2002-03-12 1:36 ` Peter Petrakis
2002-03-12 1:30 ` W Bauske
` (2 subsequent siblings)
3 siblings, 1 reply; 14+ messages in thread
From: Uncle George @ 2002-03-12 1:25 UTC (permalink / raw)
To: axp-list
I'd still be curious if there is a -v switch to ccc to explain the
options passes to the various ccc passes, as well as the linker phase.
nm on an object can have many undefines. The linker, with the correct
libs will hook up the right routines (hopefully )
But, having turned on my alpha, i suppose this is true for i386 also,
there is no real alloca ( looked in all the .so's in /lib ) , so the
linker is correct. Ergo, there musta have been a define alloca malloc
somewhere in the 'include' files. So there musta be a hidden -D switch
in the gcc command that is not in the ccc command.
Peter Petrakis wrote:
>
> > u'd probably get a better idea at why alloca is missing ( from the ccc
> > libraries? maybe ) is there was a -v to list out all the options passed
>
> I don't know honestly. I'm not that familiar with ccc nevermind the linker.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-12 0:24 ` Peter Petrakis
2002-03-12 1:25 ` Uncle George
@ 2002-03-12 1:30 ` W Bauske
2002-03-12 1:50 ` Uncle George
2002-03-12 1:56 ` Uncle George
3 siblings, 0 replies; 14+ messages in thread
From: W Bauske @ 2002-03-12 1:30 UTC (permalink / raw)
To: axp-list
Peter Petrakis wrote:
>
> > u'd probably get a better idea at why alloca is missing ( from the ccc
> > libraries? maybe ) is there was a -v to list out all the options passed
>
> I don't know honestly. I'm not that familiar with ccc nevermind the linker.
>
> > to the various ccc phases. In particular the /bin/ld switches that ccc
> > may/maynot know about. an then the possible solution would be to add
> > -lmalloc to this build
>
> There doesnt seem to be a -lmalloc on this system, Thats what ld claims. I
> thought that functionality as in -lc?
>
> voodoo@asterix:~/Xfree/build/config/imake > ccc -o
> imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmis
> sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
> imake.o -Wl,-rpath-link,../../exports/lib -lmalloc -lc
> /usr/bin/ld: cannot find -lmalloc
> collect2: ld returned 1 exit status
>
It's not there because it's a builtin compiler function, meaning
the compiler just sticks a couple lines if asm code in place of the
call. Which makes sense considering it's just manipulating the stack
pointer. If you look at alloca.h, it shows alloca() is redefined when
__GNUC__ is defined. So, you need to figure out how ccc does the same
thing.
Wes
^ permalink raw reply [flat|nested] 14+ messages in thread
* yeah baby :-) RE: error logs RE: compiling X with ccc
2002-03-12 0:49 ` Michal Jaegermann
@ 2002-03-12 1:33 ` Peter Petrakis
2002-03-12 2:06 ` Uncle George
0 siblings, 1 reply; 14+ messages in thread
From: Peter Petrakis @ 2002-03-12 1:33 UTC (permalink / raw)
To: axp-list
> 'make -Dalloca=malloc' or add this define to your compilation flags.
OK. Tried it. same effect :-). I think the root of the problem is the linker
doesnt know what lmalloc is to begin with. Take it down to the bare bones.
# ld imake.o
will give me about 50 lines of undefined symbols.
voodoo@asterix:~/Xfree/build/config/imake > ld imake.o -lc
ld: warning: cannot find entry symbol __start; defaulting to
0000000120000f60
imake.o: In function `get_libc_version':
:1010: undefined reference to `alloca'
:1010: undefined reference to `alloca'
:1010: undefined reference to `alloca'
and finally
voodoo@asterix:~/Xfree/build/config/imake > ld imake.o -lmalloc -lc
ld: cannot find -lmalloc
So either I don't have lmalloc (how), The linker needs to be told EXACTLY
where to look, or is that even the proper lib that holds alloca().
Let's bring it back some with using rpath-link which from what the man
page says should have /lib,/usr/lib in its path,
voodoo@asterix:~/Xfree/build/config/imake > ld -rpath-link
../../exports/lib -lc imake.o
ld: warning: cannot find entry symbol __start; defaulting to
0000000120000ee0
imake.o: In function `get_distrib':
:961: undefined reference to `lstat'
:961: undefined reference to `lstat'
:961: undefined reference to `lstat'
:966: undefined reference to `lstat'
:966: undefined reference to `lstat'
imake.o::966: more undefined references to `lstat' follow
imake.o: In function `get_libc_version':
:1010: undefined reference to `alloca'
:1010: undefined reference to `alloca'
:1010: undefined reference to `alloca'
imake.o: In function `get_gcc_incdir':
:1179: undefined reference to `lstat'
:1179: undefined reference to `lstat'
:1179: undefined reference to `lstat'
imake.o: In function `CleanCppInput':
:1349: undefined reference to `fstat'
:1349: undefined reference to `fstat'
:1349: undefined reference to `fstat'
imake.o: In function `ReadLine':
:1554: undefined reference to `fstat'
:1554: undefined reference to `fstat'
imake.o::1554: more undefined references to `fstat' follow
get_gcc_incdir you say? Hmmmm.
get_gcc_incdir(FILE *inFile)
{
static char* gcc_path[] = {
#if defined(linux) || defined(__OpenBSD__) || defined (__GNU__)
"/usr/bin/cc", /* for Linux PostIncDir */
#endif
"/usr/local/bin/gcc",
"/opt/gnu/bin/gcc"
};
:-)
Wow that's ugly. NOW I got it to work by taking out the -Dlinux in the
compile step.
voodoo@asterix:~/Xfree/build/config/imake >
ccc -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmissi
ng-prototypes -Wmissing-declarations -Wnested-externs -pipe -g -I../../inc
lude -I../../exports/include/X11 -I../.. -I../../exports/include -I/usr/X11
R6-DRI/include -D__alpha__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XO
PEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFUNCPROTO=15 -DNA
RROWPROTO -DCPP_PROGRAM="\"/usr/bin/cpp\"" -DHAS_MERGE_CONSTANTS=`if
ccc -fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1>
/dev/null; then echo 1; else echo 0; fi` -c -o imake.o imake.c
cc: Info: imake.c, line 1610: In this statement, the unsigned expression
"fwrite(...)" is being compared with an equality operator to a constant
whose value is negative. This might not be what you intended.
(questcompare1)
if (fwrite(buf, sizeof(char), cnt, fd) == -1)
------------^
cc: Info: imake.c, line 156: This top level include file appears to be
unused. (unusedtop)
#include "Xosdefs.h"
-^
cc: Info: imake.c, line 169: This top level include file appears to be
unused. (unusedtop)
#include <sys/types.h>
-^
cc: Info: imake.c, line 191: This top level include file appears to be
unused. (unusedtop)
#include <sys/stat.h>
-^
cc: Info: imake.c, line 230: This top level include file appears to be
unused. (unusedtop)
#include <stdlib.h>
-^
voodoo@asterix:~/Xfree/build/config/imake > make -f Makefile.proto
rm -f imake
ccc -o
imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmis
sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
imake.o -Wl,-rpath-link,../../exports/lib
SUCCESS!!!
but.
voodoo@asterix:~/Xfree/build/config/imake > ./imake
Imakefile.c:4: Imake.tmpl: No such file or directory
./imake: Exit code 1.
Stop.
voodoo@asterix:~/Xfree/build/config/imake > nm imake
0000000000000000 a *ABS*
0000000000000000 a *ABS*
0000000000000000 a *ABS*
0000000000000000 a *ABS*
0000000000000000 a *ABS*
0000000000000000 a *ABS*
00000001200017f8 T AddCppArg
0000000120001758 T AddMakeArg
0000000120001fa8 T CheckImakefileC
00000001200026a8 T CleanCppInput
0000000120002c14 T CleanCppOutput
0000000120003338 T Emalloc
0000000120001c98 T FindImakefile
00000001201046b8 B Imakefile
0000000120103f98 D ImakefileC
0000000120001d94 T LogFatal
0000000120001d64 T LogFatalI
0000000120001e18 T LogMsg
0000000120103f88 D Makefile
0000000120002fe4 T ReadLine
0000000120001898 T SetOpts
000000012000338c T Strdup
0000000120103f90 D Template
0000000120104500 A _DYNAMIC
0000000120104308 A _GLOBAL_OFFSET_TABLE_
0000000120003534 R _IO_stdin_used
0000000120104128 A _PROCEDURE_LINKAGE_TABLE_
0000000120104110 ? __CTOR_END__
0000000120104108 ? __CTOR_LIST__
0000000120104120 ? __DTOR_END__
0000000120104118 ? __DTOR_LIST__
0000000120104100 ? __EH_FRAME_BEGIN__
0000000120104100 ? __FRAME_END__
0000000120104660 A __bss_start
U __ctype_b@@GLIBC_2.0
w __deregister_frame_info@@GLIBC_2.0
0000000120001100 t __do_frame_setup
0000000120001138 t __do_frame_takedown
0000000120003480 t __do_global_ctors_aux
00000001200010c0 t __do_global_dtors_aux
U __errno_location@@GLIBC_2.0
0000000120003400 T __fstat
U __fxstat@@GLIBC_2.0
00000001200034c0 W __gmon_start__
U __libc_start_main@@GLIBC_2.0
0000000120003440 T __lstat
U __lxstat@@GLIBC_2.0
w __register_frame_info@@GLIBC_2.0
0000000120001080 W __start
0000000120104660 A _edata
0000000120104700 A _end
00000001200034e0 A _etext
00000001200034e0 ? _fini
0000000120001020 ? _init
0000000120001080 T _start
U access@@GLIBC_2.0
0000000120001538 T catch
00000001201046c8 B cleanedImakefile
U close@@GLIBC_2.0
00000001201046b0 B cpp
0000000120104660 S cpp_argindex
0000000120103c28 D cpp_argv
0000000120002474 T cppit
0000000120002448 T define_os_defaults
0000000120002168 T doit
U dup2@@GLIBC_2.0
U execvp@@GLIBC_2.0
U exit@@GLIBC_2.0
U fclose@@GLIBC_2.1
U fdopen@@GLIBC_2.1
U fflush@@GLIBC_2.0
U fgets@@GLIBC_2.0
U fileno@@GLIBC_2.0
U fopen@@GLIBC_2.1
U fork@@GLIBC_2.0
U fprintf@@GLIBC_2.0
U fread@@GLIBC_2.0
U fseek@@GLIBC_2.0
0000000120003400 W fstat
U ftruncate@@GLIBC_2.0
U fwrite@@GLIBC_2.0
U getenv@@GLIBC_2.0
00000001201046c0 B haveImakefileC
000000012000157c T init
0000000120002ce8 T isempty
0000000120003440 W lstat
0000000120001170 T main
0000000120104670 S make_argindex
0000000120103db8 D make_argv
0000000120002674 T makeit
U malloc@@GLIBC_2.0
U mkstemp@@GLIBC_2.0
00000001200020a4 T optional_include
U pclose@@GLIBC_2.1
U popen@@GLIBC_2.1
0000000120104668 S program
0000000120103fa0 D show
0000000120001f2c T showargs
00000001200013d4 T showit
U signal@@GLIBC_2.0
U sprintf@@GLIBC_2.0
U sscanf@@GLIBC_2.0
U stderr@@GLIBC_2.0
U stdout@@GLIBC_2.0
U strcat@@GLIBC_2.0
U strcmp@@GLIBC_2.0
U strcpy@@GLIBC_2.0
U strerror@@GLIBC_2.0
U strlen@@GLIBC_2.0
U strncmp@@GLIBC_2.0
U strstr@@GLIBC_2.0
0000000120103f78 D tmpImakefile
0000000120103f70 D tmpMakefile
U unlink@@GLIBC_2.0
00000001201046d0 B verbose
U wait@@GLIBC_2.0
0000000120001488 T wrapup
00000001200032d4 T writetmpfile
If I try and do a 'make World' again it will trash this program.
Mike?
Peter
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: error logs RE: compiling X with ccc
2002-03-12 1:25 ` Uncle George
@ 2002-03-12 1:36 ` Peter Petrakis
2002-03-12 2:42 ` Uncle George
0 siblings, 1 reply; 14+ messages in thread
From: Peter Petrakis @ 2002-03-12 1:36 UTC (permalink / raw)
To: axp-list
> I'd still be curious if there is a -v switch to ccc to explain the
> options passes to the various ccc passes, as well as the linker phase.
voodoo@asterix:~/Xfree/build > ccc -v
comp.config
ontains: -SD/usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/include -SD/usr/loc
al/include -SD/usr/lib/gcc-lib/alpha-suse-linux/2.95.2/include -SD/usr/inclu
de | -SysIncDir
sr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/include -SysIncDir
/usr/local/include -SysIncDir
/usr/lib/gcc-lib/alpha-suse-linux/2.95.2/include -SysIncDir
/usr/include -L/usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/lib -L/usr/lib/
gcc-lib/alpha-suse-linux/2.95.2 -L/usr/alpha-suse-linux/lib
ccc: Error: No source or object files specified on the command line
all the 'help' is in the man page.
> nm on an object can have many undefines. The linker, with the correct
> libs will hook up the right routines (hopefully )
Wait till you see my next post. I suppose hacking imake.c may be the easiest
thing to do. Messing with makefiles just to -Ulinux 'once' may be a real
pain
and after seeing the number of ifdefs in imake.c I don't think the X
maintainers
would mind :-)
Peter
--
www.linuxalpha.org www.alphadriven.org
Peter Petrakis Warrior/Engineer voodoo@alphadriven.org
"<BLAM!!> Who the hell are you!? Name's Ash <click clock> Housewares..."
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-12 0:24 ` Peter Petrakis
2002-03-12 1:25 ` Uncle George
2002-03-12 1:30 ` W Bauske
@ 2002-03-12 1:50 ` Uncle George
2002-03-12 1:56 ` Uncle George
3 siblings, 0 replies; 14+ messages in thread
From: Uncle George @ 2002-03-12 1:50 UTC (permalink / raw)
To: axp-list
the gcc compiler has these gcc/glibc defines "> > to the various ccc
phases. In particular the /bin/ld switches that ccc
> > may/maynot know about. an then the possible solution would be to add
> > -lmalloc to this build
>
> There doesnt seem to be a -lmalloc on this system, Thats what ld claims. I
> thought that functionality as in -lc?
>
> voodoo@asterix:~/Xfree/build/config/imake > ccc -o
> imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith -Wstrict-prototypes -Wmis
> sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
> imake.o -Wl,-rpath-link,../../exports/lib -lmalloc -lc
> /usr/bin/ld: cannot find -lmalloc
> collect2: ld returned 1 exit status
>
> Checkout what 'else' unresolved.
>
> voodoo@asterix:~/Xfree/build/config/imake > nm imake.o
> 0000000000000688 T AddCppArg
> 00000000000005e8 T AddMakeArg
> 0000000000000e38 T CheckImakefileC
> 00000000000021d0 T CleanCppInput
> 000000000000273c T CleanCppOutput
> 0000000000002e60 T Emalloc
> 0000000000000b28 T FindImakefile
> 0000000000000008 B Imakefile
> 00000000000014f0 D ImakefileC
> 0000000000000c24 T LogFatal
> 0000000000000bf4 T LogFatalI
> 0000000000000ca8 T LogMsg
> 00000000000014e0 D Makefile
> 0000000000002b0c T ReadLine
> 0000000000000728 T SetOpts
> 0000000000002eb4 T Strdup
> 00000000000014e8 D Template
> U __ctype_b
> U __errno_location
> U abort
> U access
> U alloca
> 00000000000003c8 T catch
> 0000000000000018 B cleanedImakefile
> U close
> 0000000000000000 B cpp
> 0000000000000008 C cpp_argindex
> 0000000000000c08 D cpp_argv
> 0000000000001f9c T cppit
> 0000000000001dbc T define_os_defaults
> 0000000000000ff8 T doit
> U dup2
> U execvp
> U exit
> U fclose
> U fdopen
> U fflush
> U fgetc
> U fgets
> U fileno
> U fopen
> U fork
> U fprintf
> U fread
> U fscanf
> U fseek
> U fstat
> U ftruncate
> U fwrite
> U getenv
> 0000000000000010 B haveImakefileC
> 000000000000040c T init
> 0000000000002810 T isempty
> 00000000000015a8 D libc_c
> U lstat
> 0000000000000000 T main
> 0000000000000008 C make_argindex
> 0000000000000d98 D make_argv
> 000000000000219c T makeit
> U malloc
> U mkstemp
> 0000000000000f34 T optional_include
> U pclose
> U perror
> U popen
> 0000000000000008 C program
> U remove
> 00000000000014f8 D show
> 0000000000000dbc T showargs
> 0000000000000264 T showit
> U signal
> U snprintf
> U sprintf
> U sscanf
> U stderr
> U stdout
> U strcat
> U strcmp
> U strcpy
> U strerror
> U strlen
> U strncmp
> U strstr
> 00000000000014d0 D tmpImakefile
> 00000000000014c8 D tmpMakefile
> U uname
> U ungetc
> U unlink
> 0000000000000020 B verbose
> U wait
> 0000000000000318 T wrapup
> 0000000000002dfc T writetmpfile
>
> Peter
>
> > Peter Petrakis wrote:
> > >
> > > It fails compiling imake of all things . I suppose the default
> > CC settings
> >
> > > rm -f imake
> > > ccc -o
> > > imake -O0 -g -mcpu=ev6 -ansi -Wall -Wpointer-arith
> > -Wstrict-prototypes -Wmis
> > > sing-prototypes -Wmissing-declarations -Wnested-externs -pipe -g
> > > imake.o -Wl,-rpath-link,../../exports/lib
> > > imake.o: In function `get_libc_version':
> > > :1010: undefined reference to `alloca'
> > > :1010: undefined reference to `alloca'
> > > :1010: undefined reference to `alloca'
> > > collect2: ld returned 1 exit status
> >
> >
> >
> > _______________________________________________
> > Axp-list mailing list
> > Axp-list@redhat.com
> > https://listman.redhat.com/mailman/listinfo/axp-list
> >
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
Peter Petrakis wrote:
>
> > u'd probably get a better idea at why alloca is missing ( from the ccc
> > libraries? maybe ) is there was a -v to list out all the options passed
>
> I don't know honestly. I'm not that familiar with ccc nevermind the linker.
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-12 0:24 ` Peter Petrakis
` (2 preceding siblings ...)
2002-03-12 1:50 ` Uncle George
@ 2002-03-12 1:56 ` Uncle George
3 siblings, 0 replies; 14+ messages in thread
From: Uncle George @ 2002-03-12 1:56 UTC (permalink / raw)
To: axp-list
there are extra GLIBC switches in the gcc compile. like -D__GNUC__=2
-D__GNUC_MINOR__=96 .......
these switches are feed into the included system files.
Peter Petrakis wrote:
>
> > u'd probably get a better idea at why alloca is missing ( from the ccc
> > libraries? maybe ) is there was a -v to list out all the options passed
>
> I don't know honestly. I'm not that familiar with ccc vermind the linker.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: yeah baby :-) RE: error logs RE: compiling X with ccc
2002-03-12 1:33 ` yeah baby :-) " Peter Petrakis
@ 2002-03-12 2:06 ` Uncle George
0 siblings, 0 replies; 14+ messages in thread
From: Uncle George @ 2002-03-12 2:06 UTC (permalink / raw)
To: axp-list
there is no real alloca!
I suppose/suspect if you define the same -D__GNUC switches that are in
gcc -v, but not in the ccc -v you will get a compile more like the gcc
compile.
Peter Petrakis wrote:
>
> > 'make -Dalloca=malloc' or add this define to your compilation flags.
>
> OK. Tried it. same effect :-). I think the root of the problem is the linker
> doesnt know what lmalloc is to begin with. Take it down to the bare bones.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: error logs RE: compiling X with ccc
2002-03-12 1:36 ` Peter Petrakis
@ 2002-03-12 2:42 ` Uncle George
0 siblings, 0 replies; 14+ messages in thread
From: Uncle George @ 2002-03-12 2:42 UTC (permalink / raw)
To: axp-list
it might be experimentally easier to add the -D__GNUC_ switches to the
ccc environment file
.../alpha-linux/bin/comp.config
Peter Petrakis wrote:
>
> > I'd still be curious if there is a -v switch to ccc to explain the
> > options passes to the various ccc passes, as well as the linker phase.
>
> voodoo@asterix:~/Xfree/build > ccc -v
> comp.config
> ontains: -SD/usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/include -SD/usr/loc
> al/include -SD/usr/lib/gcc-lib/alpha-suse-linux/2.95.2/include -SD/usr/inclu
> de | -SysIncDir
> sr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/include -SysIncDir
> /usr/local/include -SysIncDir
> /usr/lib/gcc-lib/alpha-suse-linux/2.95.2/include -SysIncDir
> /usr/include -L/usr/lib/compaq/ccc-6.2.9.504-2/alpha-linux/lib -L/usr/lib/
> gcc-lib/alpha-suse-linux/2.95.2 -L/usr/alpha-suse-linux/lib
> ccc: Error: No source or object files specified on the command line
>
> all the 'help' is in the man page.
>
> > nm on an object can have many undefines. The linker, with the correct
> > libs will hook up the right routines (hopefully )
>
> Wait till you see my next post. I suppose hacking imake.c may be the easiest
> thing to do. Messing with makefiles just to -Ulinux 'once' may be a real
> pain
> and after seeing the number of ifdefs in imake.c I don't think the X
> maintainers
> would mind :-)
>
> Peter
> --
> www.linuxalpha.org www.alphadriven.org
> Peter Petrakis Warrior/Engineer voodoo@alphadriven.org
> "<BLAM!!> Who the hell are you!? Name's Ash <click clock> Housewares..."
> >
>
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2002-03-12 2:45 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-11 19:43 compiling X with ccc Peter Petrakis
2002-03-11 22:24 ` error logs " Peter Petrakis
2002-03-11 23:30 ` Uncle George
2002-03-12 0:24 ` Peter Petrakis
2002-03-12 1:25 ` Uncle George
2002-03-12 1:36 ` Peter Petrakis
2002-03-12 2:42 ` Uncle George
2002-03-12 1:30 ` W Bauske
2002-03-12 1:50 ` Uncle George
2002-03-12 1:56 ` Uncle George
2002-03-12 0:23 ` W Bauske
2002-03-12 0:49 ` Michal Jaegermann
2002-03-12 1:33 ` yeah baby :-) " Peter Petrakis
2002-03-12 2:06 ` Uncle George
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox