User forums > Help

Problem with a call to ar

<< < (3/4) > >>

gd_on:
I have tried this patch on several machines (Windows 7, XP, CentOS 5, Redhat 5), with the test case sent previously. I think it works.
Nevertheless, I have seen two other things, not related to this problem.
1) on only one of the machine (a CentOS one), I had to explicitely add in the compiler search path ../obj. If not, the .mod generated files are not found when sphr_init.f90 is compiled.
2) I have set explicitly compiling priorities to be sure that .mod files are created before their use (I tried this with and without parallel generations) :
error_mesg.f90 to 0
math_latlon_to_vect.f90 to 50
sphr_init.f90 to 25
sphr_module_variables.f90 to 0

But after a full generation, priorities are changed :
math_latlon_to_vect.f90 to 0
sphr_init.f90 to 1

In this case, it's not really a problem, because error_mesg.f90 and sphr_module_variables.f90 really need to be compiled first, because the .mod generated are then used by sphr_init.f90.
math_latlon_to_vect.f90 is totally independant, so it's compilation priority is not a problem.
But, why priorities are automatically changed ?

I use self compiled svn 8812 on linux and self compiled svn 8835 on Windows.

gd_on

oBFusCATed:
Alpha:
Would this feature work for my rm+ar feature request while building static libs?
What should I do to add rm before the ar command in the last step of building static libs?

Alpha:

--- Quote from: gd_on on February 05, 2013, 11:18:01 am ---But, why priorities are automatically changed ?

--- End quote ---
This should not be happening... I am looking into it.


--- Quote from: oBFusCATed on February 07, 2013, 09:00:48 am ---Would this feature work for my rm+ar feature request while building static libs?
What should I do to add rm before the ar command in the last step of building static libs?

--- End quote ---
The way previously discussed involved hard coding so this worked always for all compilers.  However, you could instead patch the option in each compiler you want it in.  For example:

--- Code: ---Index: src/plugins/compilergcc/resources/compilers/options_gcc.xml
===================================================================
--- src/plugins/compilergcc/resources/compilers/options_gcc.xml (revision 8834)
+++ src/plugins/compilergcc/resources/compilers/options_gcc.xml (working copy)
@@ -122,6 +122,8 @@
                  value="$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs -mwindows"/>
         <Command name="LinkDynamic"
                  value="$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs"/>
+        <Command name="LinkStatic"
+                 value="cmd /c if exist $static_output del $static_output\n$lib_linker -r -s $static_output $link_objects"/>
     </if>
     <else>
         <Command name="LinkNative"
@@ -130,9 +132,9 @@
                  value="$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs"/>
         <Command name="LinkDynamic"
                  value="$linker -shared $libdirs $link_objects $link_resobjects -o $exe_output $link_options $libs"/>
+        <Command name="LinkStatic"
+                 value="test -w $static_output && rm -f $static_output\n$lib_linker -r -s $static_output $link_objects"/>
     </else>
-    <Command name="LinkStatic"
-             value="$lib_linker -r -s $static_output $link_objects"/>
     <Common name="cmds"/>
 
     <Common name="re"/>

--- End code ---

gd_on:
The patch that was proposed in http://forums.codeblocks.org/index.php/topic,17424.msg119880.html#msg119880 has not been officially implemented. May be forgotten ?
Because, I think it's correct.

gd_on

oBFusCATed:
Both patches are now in svn, lets see how it will work out. I've not tested them, because of lack of time unfortunately.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version