mpfr issues when Installing gcc 3.4 on fedora core
Hi I have tried everything any page might say on this, still stuck. Any help would be great Hi all I am trying to install 3.4 on my AMD turion 64 machine with fedora core. But run into messages like this on gmake. Configure is fine libbackend.a(builtins.o): In function `fold_builtin_cbrt': ../.././gcc/builtins.c:7175: undefined reference to `mpfr_cbrt' libbackend.a(builtins.o): In function `fold_builtin_exponent': ../.././gcc/builtins.c:8183: undefined reference to `mpfr_exp10' libbackend.a(builtins.o): In function `fold_builtin_1': ../.././gcc/builtins.c:9400: undefined reference to `mpfr_erf' ../.././gcc/builtins.c:9406: undefined reference to `mpfr_erfc' . Installed mpfr and gmp and verified mpfr.h and gmp.h exist in /usr/local/include and libmpfr.a , libgmp.so etc exists in /usr/local/lib I have tried the following things 1../configure --with-mpfr=/usr/local/lib --with-gmp=/usr/local 2. ./configure --with-mpfr-build= --with-gmp-build= 3. --with-mpfr-lib, --with-mpfr-include, 4. Update LD_LIBRARY_PATH to also include /usr/local/ 5.--enable-languages=c,c++ --disable-mpfr I just want a working gcc 3.4 and I really dont care for this precision library. Any sugesstions on how to get it to work ... thanks dz
Re: mpfr issues when Installing gcc 3.4 on fedora core
The only warning it reports is this immediately after detecting gmp and mpfr *** This configuration is not supported in the following subdirectories: target-libada gnattools target-libgfortran target-libffi target-zlib target-libjava zlib target-libobjc target-boehm-gc The other suggestions u have said were typos: I have used LD_LIBRARY_PATH with /usr/local/lib and --with-mpfr=/usr/local --with-gmp=/usr/loc I got the 3.4 sources from the gcc site. Is there a way I can get prebuilt binaries ? thanks dz On 1/3/07, Joe Buck <[EMAIL PROTECTED]> wrote: On Wed, Jan 03, 2007 at 08:11:35PM -0500, drizzle drizzle wrote: > Hi > I have tried everything any page might say on this, still > stuck. Any help would be great > Hi all > > I am trying to install 3.4 on my AMD turion 64 machine with fedora > core. You mean 4.3 (or rather a snapshot or svn checkout, since 4.3 does not exist yet). > But run into messages like this on gmake. Configure is fine > > libbackend.a(builtins.o): In function `fold_builtin_cbrt': > ../.././gcc/builtins.c:7175: undefined reference to `mpfr_cbrt' > libbackend.a(builtins.o): In function `fold_builtin_exponent': > ../.././gcc/builtins.c:8183: undefined reference to `mpfr_exp10' > libbackend.a(builtins.o): In function `fold_builtin_1': > ../.././gcc/builtins.c:9400: undefined reference to `mpfr_erf' > ../.././gcc/builtins.c:9406: undefined reference to `mpfr_erfc' Does the configure output report any warnings about having the wrong version of mpfr? > Installed mpfr and gmp and verified mpfr.h and gmp.h exist in > /usr/local/include and libmpfr.a , libgmp.so etc exists in > /usr/local/lib > > I have tried the following things > 1../configure --with-mpfr=/usr/local/lib --with-gmp=/usr/local Should be --with-mpfr=/usr/local > 2. ./configure --with-mpfr-build= > --with-gmp-build= Not sure why that one didn't work. > 3. --with-mpfr-lib, --with-mpfr-include, > 4. Update LD_LIBRARY_PATH to also include /usr/local/ > 5.--enable-languages=c,c++ --disable-mpfr LD_LIBRARY_PATH has to have /usr/local/lib, not /usr/local. Please check that. I suspect that this is the root of the problem. I also think that gcc should be more robust in dealing with an mpfr.so not on the LD_LIBRARY_PATH that it has already found via configure, but that's another story. --disable-mpfr is not an option; mpfr is required now. > I just want a working gcc 3.4 and I really dont care for this > precision library. Any sugesstions on how to get it to work ... If you want 3.4, then get it from ftp.gnu.org or a mirror, and you won't need mpfr.
Re: mpfr issues when Installing gcc 3.4 on fedora core
Not 4.3 but 3.4 yes the older version. And I built and installed mpfr and gmp. gmp4.1 and mpfr 2.2. I dont have a /usr/local/lib64 on my system. Did my mpfr/gmp install incorrecly ? dz On 1/3/07, Matt Fago <[EMAIL PROTECTED]> wrote: You do mean gcc 4.3 right (either a snapshot, or from svn)? Since you're running on x86_64, do you know that the libraries are the correct bitness (running 'file' on the mpfr and gmp libraries will tell). By default gcc on x86_64 will build 64-bit, but libraries in /usr/local/lib should only be 32-bit (versus /usr/local/ lib64). The linker will ignore any 32-bit libraries when linking a 64- bit executable. How did you install gmp/mpfr (note the package from fedora is broken -- very old)? It took me quite a while to get 4.1 with fortran installed on RHEL until I got this all sorted out (I was new to multilibs). I just upgraded to fc6 and was able to install gcc from svn once I used -- with-gmp-lib=/usr/local/lib64 (etc for include and mpfr) and setting LD_LIBRARY_PATH=/usr/local/lib64 appropriately. Alternatively one could (carefully!) setup /etc/ld.so.conf and run ldconfig (I did this on RHEL). I might be able to help tomorrow AM (US mountain time) if you email me directly. FWIW, I understand the reason to keep mpfr out of the gcc tree, but not doing so makes gcc more difficult to bootstrap for a novice such as myself. Fedora's outdated gmp/mpfr package doesn't help either ... - Matt
Re: mpfr issues when Installing gcc 3.4 on fedora core
I am wondering if my all my troubles stem from mpfr not being installed properly .. When I configure mpfr I get the following warning. Cud this be an issue ? checking if gmp.h version and libgmp version are the same... (4.2.1/4.1.4) no configure: WARNING: 'gmp.h' and 'libgmp' seems to have different versions or configure: WARNING: we cannot run a program linked with GMP (if you cannot configure: WARNING: see the version numbers above). configure: WARNING: However since we can't use 'libtool' inside the configure, configure: WARNING: we can't be sure. See 'config.log' for details. And as matt suggested if mpfr is not needed by 3.4, how can I configure it that way. --disable -mpfr did not help. thanks for all the hints so far dz On 1/4/07, Vincent Lefevre <[EMAIL PROTECTED]> wrote: On 2007-01-03 22:19:16 -0500, drizzle drizzle wrote: > Not 4.3 but 3.4 yes the older version. And I built and installed mpfr > and gmp. gmp4.1 and mpfr 2.2. I dont have a /usr/local/lib64 on my > system. Did my mpfr/gmp install incorrecly ? I don't think MPFR install libs in .../lib64 (everytime I tried on an x86_64 machine, it didn't, but I was using another prefix directory, in my $HOME). Anyway, MPFR is based on the autotools. So, it would be a problem with the autotools. But you can change that with the --libdir configure option: --libdir=DIR object code libraries [EPREFIX/lib] -- Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Re: mpfr issues when Installing gcc 3.4 on fedora core
Still no luck so far .. I got the gcc3.4 from the gcc archive. Any way I can make gcc 3.4 not use these libraries ? thanks dz On 1/4/07, Joe Buck <[EMAIL PROTECTED]> wrote: On Thu, Jan 04, 2007 at 07:25:03PM +0100, Vincent Lefevre wrote: > In case you still get the warning after trying that, I think that one > can get the same kind of problems when the ABI is incorrect, e.g. a > 32-bit GMP library in /usr/lib, a 64-bit GMP library in /usr/local/lib > and a MPFR build in the 32-bit ABI (contrary to GMP, MPFR doesn't > change the ABI by default): the 64-bit GMP library will be skipped, > and the GMP library will be taken from /usr/lib (whereas the gmp.h > will still be taken from /usr/local/include). It is an annoying problem that MPFR and GMP follow inconsistent rules. For example, if you configure the current version of both on a sparc-sun-solaris machine, GMP will build a 64-bit version and MPFR will build a 32-bit version.
Re: mpfr issues when Installing gcc 3.4 on fedora core
I configure with --enable-languages=c,c++ . Shudnt that disable gfortran ? thanks dz On 1/4/07, Richard Guenther <[EMAIL PROTECTED]> wrote: On 1/4/07, drizzle drizzle <[EMAIL PROTECTED]> wrote: > Still no luck so far .. I got the gcc3.4 from the gcc archive. Any way > I can make gcc 3.4 not use these libraries ? 3.4 doesn't use gmp or mpfr, gfortran introduces this dependency but it appears with 4.0 or newer only. Richard.
Invariant division
Hi Does gcc do an divison by constant optimization for any 16 bit architecture. Can anyone point me to where it does that ? thanks dz
gcc preprocessor
Hi Can some one tell me if gcc preprocessor can support in some way the following features 1. Repeating a block a certain number of times 2. Multiline macros with new lines 3. Setting a symbolic constant inside a #define thanks dz
Re: gcc preprocessor
Ok can you tell me what directives does it provide to do what I have said . And I am not a beginner to gcc. 1. Repeating a block a certain number of times for example repeat expr foo() end Then you can call expr 5 to have foo called 5 times. 2. Multiline macros with new lines Using #defines with escape characters is very clumsy and it just concatenates it into one line as far as I understand. Please correct me if that is wrong. 3. Setting a symbolic constant inside a #define for example #set a i+1 foo(a) Thanks for any help dz On 4/18/07, Joe Buck <[EMAIL PROTECTED]> wrote: On Wed, Apr 18, 2007 at 09:07:07PM -0400, drizzle drizzle wrote: > Can some one tell me if gcc preprocessor can support in some way > the following > features You are asking a beginner C programming question. gcc's preprocessor does what standard C preprocessors do.
Re: gcc preprocessor
Any developer sense on what it might take to extend the gcc preprocessor to do these ? I have some experience with gcc front end. I am especially keen abt multiline macros, so that the lines can be on separate lines. Any neat trick that can accomplish this by using #define ? dz On 4/20/07, Joe Buck <[EMAIL PROTECTED]> wrote: On Fri, Apr 20, 2007 at 01:27:48PM -0400, drizzle drizzle wrote: > Ok can you tell me what directives does it provide to do what I > have said . And I am not a beginner to gcc. The answer is that gcc provides what the C standard specifies and nothing more. You appear to want a more complicated macro-processing language. You'll need to look elsewhere; m4 is one possibility, though I'dm not a fan of it.
debug output and register allocation
Hi I am wondering how gcc handles producing debug information for automatic variables that do not reside inthe stack.For example when say register allocation decides to assign a particular register to a variable or say it decides that the value is a constant. Can some one point me to the relevant pieces of code ? thanks for any pointers dz
debugging quality and gcc
Hi I am wondering if from a developer perspective some body can tell me what debugging quality to expect when using -g with O3. Especially when the following happen 1. When a variable resides in multiple locations in different scopes such as different registers. If this works very well, I am wondering how gcc accomplishes this? 2. A function is inlined. 3. Constant propagation. Due to constraints of my use, I have to generate code without the frame pointer. thanks dz
Annotations in tree
Hi, I am trying to find out how to insert annotations for certain array references identified in tree-loop-linear.c so that when converting to RTL they can be handled differently. I find that simply inserting a flag in the tree node is not enough as optimizations later on can lead to the node being removed. Can any tell me what else can I do ? I will appreciate all help dz
Re: Annotations in tree
I am not sure if I unerstand ...can you elaborate please ? So what I need is if I identify say a reference a[i] inside a loop, I want to identify the corresponding RTL. What I find now is that these get transformed for example D.1065_17 = a_matrix[i_24][k_30]; // I have identified this sum_12 = D.1065_17 + sum_31; gets coalesced back into sum = a_matrix[i][k] + sum; before it is expaned into rtl.. How do I keep track that it is indeed the same array reference though it has gone through some transformation. ( One another tranformation is generating a pointer to it instead of using the array). Sumesh On 7/26/05, Diego Novillo <[EMAIL PROTECTED]> wrote: > On Tue, Jul 26, 2005 at 04:21:51PM -0400, drizzle drizzle wrote: > > >I am trying to find out how to insert annotations for certain array > > references identified in tree-loop-linear.c so that when converting to > > > In the ARRAY_REFs themselves? I would build a hash table on the > side. If it's on the DECLs, you could use var_ann() to add > annotations. >
Re: Annotations in tree
What doesnt exist very long - the references ? At RTL level, I just want to insert a counter for each one of these. One alternative I saw is inserting a dummy functiion call. Would that work ? If so, for a given name, how do I create a corresponding function expression for it ? thanks for the answers On 7/26/05, Daniel Berlin <[EMAIL PROTECTED]> wrote: > On Tue, 2005-07-26 at 18:39 -0400, drizzle drizzle wrote: > > I am not sure if I unerstand ...can you elaborate please ? So what I > > need is if I identify say a reference a[i] inside a loop, I want to > > identify the corresponding RTL. > > What are you trying to do at the RTL level with array references? > They don't last that long. > > >
Re: Annotations in tree
tree level is fine too, it was just that the RTL level already had a host of counters being inserted. One implementation question if I may ask, so at the tree level how do I create a call to my function. I know how to insert it into the tree but some how all my creations attempts with build_function_call fail. thanks once again ... On 7/26/05, Daniel Berlin <[EMAIL PROTECTED]> wrote: > On Tue, 2005-07-26 at 19:42 -0400, drizzle drizzle wrote: > > What doesnt exist very long - the references ? > > By RTL, they've been expanded to pointer accesses. > > > At RTL level, I just want to insert a counter for each one of > > these. > Why do it at the rtl level. > Why not do it at the tree level? > > >
Inserting a call statement
Hi I am trying to insert a function call "foo" inside the tree list. Inside this particular loop for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) { //if a particular condition is satisfied I do the following tree id = get_identifier ("foo"); tree t = build_function_type_list (void_type_node,NULL_TREE); tree decl = build_decl (FUNCTION_DECL, id, t); tree call = build_function_call_expr (decl, NULL); bsi_insert_before(&bsi,call,BSI_CHAIN_END); // I have tried BSI_NEW_STMT } Although the node is created properly, an assertion in tree-flow-inline.h fails. Can someone help me identify the issue here. i will appreciate that thanks
Re: Inserting a call statement
Its inside this function static inline var_ann_t var_ann (tree t) from the error dump itseems to the following assertion gcc_assert (DECL_P (t)) thanks On 7/27/05, Daniel Berlin <[EMAIL PROTECTED]> wrote: > On Wed, 2005-07-27 at 12:33 -0400, drizzle drizzle wrote: > > Hi > > I am trying to insert a function call "foo" inside the tree list. > > > > > > Inside this particular loop > > for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) > > { > > > > //if a particular condition is satisfied I do the following > > > > tree id = get_identifier ("foo"); > > tree t = build_function_type_list (void_type_node,NULL_TREE); > > tree decl = build_decl (FUNCTION_DECL, id, t); > > tree call = build_function_call_expr (decl, NULL); > >bsi_insert_before(&bsi,call,BSI_CHAIN_END); // I have tried > > BSI_NEW_STMT > > > > > > > > } > > > > > > Although the node is created properly, an assertion in > > tree-flow-inline.h fails. Can someone help me identify the issue here. > > i will appreciate that > > What assert do you trigger? > > > > > thanks > >
Re: Inserting a call statement
Thanks for your help. I am attaching my patch. Most of the code dont modify anything. The code I am talking about is ia small piece in tree-data-ref.c in a function insert_annotations. The only modification in the rest of the code is that an extra variable refid is set for particular array references. This variable triggers the annotation. Apart from that my guess is the rest of the code can be ignored. I would appreciate any suggestions. thanks On 7/27/05, Daniel Berlin <[EMAIL PROTECTED]> wrote: > On Wed, 2005-07-27 at 17:54 +0100, Paul Brook wrote: > > On Wednesday 27 July 2005 17:33, drizzle drizzle wrote: > > > Hi > > > I am trying to insert a function call "foo" inside the tree list. > > > > > > > > > Inside this particular loop > > > for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) > > > { > > > > > > //if a particular condition is satisfied I do the following > > > > > > tree id = get_identifier ("foo"); > > > tree t = build_function_type_list (void_type_node,NULL_TREE); > > > tree decl = build_decl (FUNCTION_DECL, id, t); > > > tree call = build_function_call_expr (decl, NULL); > > > bsi_insert_before(&bsi,call,BSI_CHAIN_END); // I have tried > > > BSI_NEW_STMT > > > > > > > > > } > > > > > > > > > Although the node is created properly, an assertion in > > > tree-flow-inline.h fails. Can someone help me identify the issue here. > > > i will appreciate that > > > > You don't appear to be recording the FUNCTION_DECL anywhere, which probably > > means cgraph doesn't know about it. > > > > This is the least of his worries :) > > tree-profile doesn't record it either. > Most of the tree opts that add function calls don't update the cgraph > edges right now. > > > patch Description: Binary data
Insertng a call function
Hi I am inserting a call stmt in linear_transform_loops. Al though the call statement gets inserted , the compilation breaks. Can some one help me identify if I am missing some information in the call node that I create (thanks Daniel for all the help until now) here is the set of statements I have used tree id = get_identifier ("foo"); tree t = build_function_type_list (void_type_node,NULL_TREE); tree decl = build_decl (FUNCTION_DECL, id, t); tree call = build_function_call_expr (decl, NULL); bsi_insert_before(&bsi,call,BSI_NEW_STMT); ...Here are the tree dumps of the statement which gets inserted dump of debug_tree() > side-effects arg 0 unsigned SI size unit size align 32 symtab 0 alias set -1> constant invariant arg 0 SI file main.c line 15>>> # a_matrixD.1045 = V_MAY_DEF ; dump of debug_generic_stmt(). foo (); But this breaks with the follwoing path walk_dominator_tree->optimize_stmt->register_definitions_for_stmt->register_new_def ->get_phi_state (var)->var_ann (var)->assert(t) I will really appreciate any solutions or ideas or debugging tips. thanks
Re: Insertng a call function
Hi I updated my function call creating statement based on how gomp_parallel_end is inserted in the gomp branch. It still breaks. I have provided the function declaration in the file, just want to insert the call. Any further suggestions. My whole objective is to mark a few particular tree statements (array references actually) and carry them over to RTL form. So I am trying to insert a call before these references which when seen in RTL will tell me my references of interest. Any suggestions on some other ways I an try apart from this call insertion? here is my upated piece of code to insert a function call tree fn, type; type = build_function_type_list (void_type_node, void_type_node, NULL_TREE); tree id = get_identifier ("foo"); tree fn_decl = build_decl (FUNCTION_DECL, id, type); DECL_EXTERNAL (fn_decl) = 1; TREE_PUBLIC (fn_decl) = 1; DECL_ARTIFICIAL (fn_decl) = 1; TREE_NOTHROW (fn_decl) = 1; tree call=build_function_call_expr (fn_decl, NULL_TREE); thanks On 7/28/05, Diego Novillo <[EMAIL PROTECTED]> wrote: > On Thu, Jul 28, 2005 at 01:15:22PM -0400, drizzle drizzle wrote: > > > I am inserting a call stmt in linear_transform_loops. Al though > > the call statement gets inserted , the compilation breaks. Can some > > one help me identify if I am missing some information in the call > > node that I create (thanks Daniel for all the help until now) > > > Check gomp-20050608-branch. gimple-low.c:create_gomp_fn takes a > block of code, puts it inside a new function F and replaces the > block of code with a call to F. >
Re: Insertng a call function
Could it be that it being done lower in the pass unlike insertions in tree-profile, gomp - some ssa defintion information is missing. The reason I have been led to think is because it fails register_new_defintions. I would appreciate any suggestions. thanks On 7/28/05, drizzle drizzle <[EMAIL PROTECTED]> wrote: > Hi > I updated my function call creating statement based on how > gomp_parallel_end is inserted in the gomp branch. It still breaks. I > have provided the function declaration in the file, just want to > insert the call. Any further suggestions. My whole objective is to > mark a few particular > tree statements (array references actually) and carry them over to RTL > form. So I am trying to insert a call before these references which > when seen in RTL will tell me my references of interest. Any > suggestions on some other ways I an try apart from this call > insertion? > > > here is my upated piece of code to insert a function call > tree fn, type; > type = build_function_type_list (void_type_node, > void_type_node, NULL_TREE); > tree id = get_identifier ("foo"); > tree fn_decl = build_decl (FUNCTION_DECL, id, type); > DECL_EXTERNAL (fn_decl) = 1; > TREE_PUBLIC (fn_decl) = 1; > DECL_ARTIFICIAL (fn_decl) = 1; > TREE_NOTHROW (fn_decl) = 1; > > tree call=build_function_call_expr (fn_decl, NULL_TREE); > > > thanks > > > On 7/28/05, Diego Novillo <[EMAIL PROTECTED]> wrote: > > On Thu, Jul 28, 2005 at 01:15:22PM -0400, drizzle drizzle wrote: > > > > > I am inserting a call stmt in linear_transform_loops. Al though > > > the call statement gets inserted , the compilation breaks. Can some > > > one help me identify if I am missing some information in the call > > > node that I create (thanks Daniel for all the help until now) > > > > > Check gomp-20050608-branch. gimple-low.c:create_gomp_fn takes a > > block of code, puts it inside a new function F and replaces the > > block of code with a call to F. > > >
Re: how to compile gcc
If you are objective is to debug gcc, then all the necessary setup is already done...Check this documentation http://gcc.gnu.org/wiki/DebuggingGCC. dz On 8/20/05, Rafael Ávila de Espíndola <[EMAIL PROTECTED]> wrote: > On Friday 19 August 2005 20:26, Jiang Long wrote: > > Hello, > > > > I 'd like to dig into gcc internals, and would like to compile it with -g. > > > > I can't find any document on how to do that? I tried > > > > make BOOT_CFLAGS=-g CFLAGS=-g, > > > > but it still will add '-O2' later on. > > > > Any documentation on how GCC is compiled? what are the stages of the > > compilation? > yes, > http://gcc.gnu.org/install/configure.html > look at --enable-checking > and > http://gcc.gnu.org/install/build.html > There are more cflags... > > The gcc/Makefile.in is also a good reference :) > > > Thanks, > > > > -Jiang > > > Rafael > > >
Using Alias analysis
Hi . I want to use gcc's alias analysis in a standalone way. What I observe is that a lot of the information is hidden because of additional temporaries that have been generated. Can any one suggest as to if there is a simple workaround to this ? To illustrate what I am saying for a stmt heap_ptr= (int**) malloc the alias analysis tells me D.1072 points to malloc and heap_ptr points to anything. I would have liked to see heap_ptr points to malloc. Any way I can get that information. I would appreciate any idea/suggestions ... dz