<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=491&amp;type=atom" />
	<updated>2015-09-15T00:35:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=491</id>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2209#p2209" />
			<content type="html"><![CDATA[<p>That&#039;s great to hear that you&#039;ve figured out why you&#039;re seeing the error.</p><p>If you&#039;re still interested, you can reset your preferences for the debugger by opening your home folder and deleting a file named <strong>gdbtk.ini</strong>.&nbsp; It should cause SIGSEGV errors to be displayed once again.&nbsp; If your Windows user name is the same as your forum name, the file should be located at (on Windows 7 or higher):</p><div class="codebox"><pre><code>C:\Users\wwang328\gdbtk.ini</code></pre></div><p>There shouldn&#039;t be any other side effects caused by deleting the file.</p><p>Other users please note that this fix only applies to Simply Fortran 1.45 and earlier.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-09-15T00:35:37Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2209#p2209</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2208#p2208" />
			<content type="html"><![CDATA[<p>Hi Jeff,</p><p>&nbsp; &nbsp; I figured out why there are SIGSEGV error message. Basically I&#039;m calling a subroutine <br />&nbsp; &nbsp;</p><div class="codebox"><pre><code> subroutine trans(v,a,b) 
             real(8), intent(out):: v(5) 
              ....... 
 end subroutine trans  </code></pre></div><p>&nbsp; &nbsp; In my main program, I did something like this<br />&nbsp; &nbsp;</p><div class="codebox"><pre><code> real(8) :: m(10,5) 
             integer :: i
            do i=1,10 
                call trans(m(i,:), a,b)
            end do </code></pre></div><p>&nbsp; &nbsp; This seems to be conflict with Fortran&#039;s rule of storing arrays by column and causes a runtime error, after I have the -fcheck=all in compiler flag.&nbsp; If m(10,5) is changed into m(5,10), the problem disappears and the debugger is working as it should be.</p>]]></content>
			<author>
				<name><![CDATA[wwang328]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3567</uri>
			</author>
			<updated>2015-09-14T21:01:37Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2208#p2208</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2206#p2206" />
			<content type="html"><![CDATA[<p>Hi, Jeff, now I&#039;m seeing the diagnostic messages when I run one version of my code. I misunderstood you suggestions and was seeking the diagnostic messages in debugger. So something indeed went wrong.<br />&nbsp; &nbsp; &nbsp;As to the SIGSEGV errors in debugger, how can I reconfigure it to show the errors again? I don&#039;t see such an option in Options-Debugger in my 1.45 SF. Sorry for my questions one after one.. And thanks a lot as always!</p><p>Wenya</p><br /><div class="quotebox"><cite>jeff wrote:</cite><blockquote><p>I would guess that your suppressing SIGSEGV errors are indeed causing the stopping at seemingly random addresses.&nbsp; Usually SIGSEGV means something has crashed completely due to memory violations.&nbsp; The link you provided does not work, so I can&#039;t comment on whether or not the problem you&#039;re seeing is related.&nbsp; However, it is rare that a SIGSEGV message is not critical.&nbsp; &nbsp;</p><p>If you do not supress SIGSEGV, you should be able to determine where the crash in your code is occurring.&nbsp; The question marks in the stack window are only indicative of confusion on the part of the debugger concerning where your code is crashing.&nbsp; The &quot;illegal input passed into the Fortran runtime library&quot; terminology was trying to imply that perhaps you&#039;re asking the Fortran runtime library to print the 200th element of a 100 element array or something similar.&nbsp; </p><p>When you added the &quot;-fcheck=all&quot; flag and ran your program outside the debugger, you didn&#039;t receive any diagnostic messages?</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[wwang328]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3567</uri>
			</author>
			<updated>2015-09-14T17:12:39Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2206#p2206</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2204#p2204" />
			<content type="html"><![CDATA[<p>I would guess that your suppressing SIGSEGV errors are indeed causing the stopping at seemingly random addresses.&nbsp; Usually SIGSEGV means something has crashed completely due to memory violations.&nbsp; The link you provided does not work, so I can&#039;t comment on whether or not the problem you&#039;re seeing is related.&nbsp; However, it is rare that a SIGSEGV message is not critical.&nbsp; &nbsp;</p><p>If you do not supress SIGSEGV, you should be able to determine where the crash in your code is occurring.&nbsp; The question marks in the stack window are only indicative of confusion on the part of the debugger concerning where your code is crashing.&nbsp; The &quot;illegal input passed into the Fortran runtime library&quot; terminology was trying to imply that perhaps you&#039;re asking the Fortran runtime library to print the 200th element of a 100 element array or something similar.&nbsp; </p><p>When you added the &quot;-fcheck=all&quot; flag and ran your program outside the debugger, you didn&#039;t receive any diagnostic messages?</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-09-14T11:20:00Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2204#p2204</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2203#p2203" />
			<content type="html"><![CDATA[<p>Hi Jeff,</p><p>&nbsp; &nbsp; Thanks for your quick reply. I tried the flag -fcheck=all. It seems not killing the problem. </p><p>&nbsp; &nbsp; However, I had this problem from some history, which might provide some useful information. The situation I was facing previously was similar to a previous post <a href="http://forums.approximatrix.com/search.php?search_id=1114754690&amp;p=3.">http://forums.approximatrix.com/search. … 0&amp;p=3.</a> I could run the program but when it came to debugger, the following message window showed up</p><p>&nbsp; &nbsp; </p><div class="codebox"><pre><code>   Signal received SIGSEGV - Segmentation fault </code></pre></div><p>&nbsp; &nbsp; Somehow, I clicked the box </p><p>&nbsp; &nbsp; </p><div class="codebox"><pre><code> Don not show me this message again </code></pre></div><p>.</p><p>&nbsp; &nbsp; After that, the debugger started to have the symptom of stopping at a random address. I tried the Stack window and it seems uninformative with two lines of questions marks: </p><p>&nbsp; &nbsp; &nbsp;</p><div class="codebox"><pre><code> ?? 
               ?? </code></pre></div><p>&nbsp; &nbsp; &nbsp;So, basically my two questions are: (1) is this problem related to my clicking of not showing SIGSEGV error message? (2) Are the question marks of Stack window pointing to &quot;illegal inputs&quot; as you mentioned earlier? </p><p>&nbsp; &nbsp; &nbsp; Thanks very much!</p>]]></content>
			<author>
				<name><![CDATA[wwang328]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3567</uri>
			</author>
			<updated>2015-09-13T15:33:31Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2203#p2203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2199#p2199" />
			<content type="html"><![CDATA[<p>In Project Options in version 1.45, you can add the flag:</p><div class="codebox"><pre><code>-fcheck=all</code></pre></div><p>in the &quot;Fortran&quot; field under Flags to enable runtime diagnostics.&nbsp; It can be helpful in determining if array bounds have been exceeded.</p><p>One thing you need to remember is that the compiler will <em>not</em> produce an executable if either a) it can&#039;t find a specified include file (nlopt.f in this case) or b) it can&#039;t find the library for linking.&nbsp; Regardless of whether you&#039;ve installed the library per their directions, you wouldn&#039;t end up with an executable if the compiler couldn&#039;t find either the library or the include file.&nbsp; Additionally, the fact that the example works fine suggests that the problem is not related to the library itself.&nbsp; I wouldn&#039;t worry about the &quot;correct&quot; directories since the compiler seems to be finding the files it needs properly.&nbsp; Their location would not affect runtime results.</p><p>For debugging, when the debugger &quot;stops&quot; at the seemingly random address, open the &quot;Stack&quot; view to see what calls led to that address.&nbsp; It is quite likely that some illegal input passed into the Fortran runtime library is causing the program to halt in the debugger.&nbsp; The debugger isn&#039;t perfect, though, so I urge you to try the compiler flag I suggested earlier.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-09-11T00:37:18Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2199#p2199</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2198#p2198" />
			<content type="html"><![CDATA[<p>Further, I have a SF version 1.45 without Runtime Diagnostics in Project Options.... My debugger seems not working as well with the complicated program. Instead of stopping at a pre-assigned breakpoint, the program stopped at 0x0x7ffd2764e251. What does this mean? Thanks!</p><br /><div class="quotebox"><cite>jeff wrote:</cite><blockquote><div class="quotebox"><cite>wwang328 wrote:</cite><blockquote><p>&nbsp; &nbsp; &nbsp;IDIR=<br /># -I error: Directory C:\Program Files (x86)\Simply Fortran\mingw-w64\include\ does not exist<br /># -I error: Directory \64\include does not exist</p><p>LDIR=-LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ <br /># -L error: Directory \64\lib does not exist</p></blockquote></div><p>Those &quot;errors&quot; are informational only. There are certain directories that Simply Fortran assumes it should check for additional Fortran 90+ modules or C include files and additional libraries.&nbsp; If the directories aren&#039;t present, a message is left behind in the Makefile.&nbsp; If these missing directories were actually supposed to include a file the compiler needed for your project, compilation wouldn&#039;t complete.&nbsp; &nbsp;The current version of Simply Fortran (2.24) has renamed these as &quot;warnings&quot; to try to alleviate questions about the messages.&nbsp; &nbsp;It&#039;s meant to be useful if, for example, a user has specified a library directory manually that doesn&#039;t exist.</p><p>If you&#039;re having issues computationally, try enabling some of the Fortran diagnostics in Project Options (under the Fortran tab, select &quot;Enable Runtime Diagnostics&quot;) and disabling all optimizations.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[wwang328]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3567</uri>
			</author>
			<updated>2015-09-10T19:07:12Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2198#p2198</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2197#p2197" />
			<content type="html"><![CDATA[<p>Thanks for your reply, Jeff!This interpretation of &quot;errors&quot; makes sense, as the example code is compiled successfully and gives right results. <br />&nbsp; &nbsp; &nbsp; However, as what&#039;s found earlier this morning, I was suspecting the correct installation of the library itself. The installation note writes: </p><p> </p><div class="quotebox"><blockquote><p>To obtain the definitions of the NLopt constants in Fortran, your Fortran program/subroutine should include the following line:<br /></p><div class="codebox"><pre><code> include &#039;nlopt.f&#039; </code></pre></div><p>The nlopt.f file is installed into the include directory along with the C/C++ header files (by default, this is /usr/local/include ... you may need to include -I/usr/local/include in your Fortran compiler flags if this directory is not in your compiler&#039;s standard include path).<br />When you compile your program you will have to link it to the NLopt library. On Unix, you would normally link with a command something like:<br /></p><div class="codebox"><pre><code> compiler ...source/object files... -lnlopt -lm -o myprogram </code></pre></div><p>where compiler is f77, gfortran, or whatever is appropriate for your machine.<br />Note: the above example assumes that you have installed the NLopt library in a place where the compiler knows to find it (e.g. in a standard directory like /usr/lib or /usr/local/lib). If you installed somewhere else (e.g. in your home directory if you are not a system administrator), then you will need to use a -L flag to tell the compiler where to find the library. See the installation manual.</p></blockquote></div><p>&nbsp; &nbsp; Obviously, it&#039;s speaking to users who are in Unix system (correct me if I&#039;m wrong). After digesting a little bit with the make file I previously got, I put the nlopt.f and nlopt.h files into </p><p>&nbsp; &nbsp; </p><div class="codebox"><pre><code> C:\Program Files (x86)\Simply Fortran\mingw-w64\x86_64-w64-mingw32\include </code></pre></div><p> </p><p>&nbsp; &nbsp; &nbsp;and changed compiler locations to those under (resource compiler location wasn&#039;t changed as I didn&#039;t find windres.exe in the following folder) <br />&nbsp; &nbsp; </p><div class="codebox"><pre><code> C:\Program Files (x86)\Simply Fortran\mingw-w64\x86_64-w64-mingw32\bin\ </code></pre></div><p> <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp;while the default is </p><p>&nbsp; &nbsp; </p><div class="codebox"><pre><code> C:\Program Files (x86)\Simply Fortran\mingw-w64\bin\ </code></pre></div><p>&nbsp; &nbsp; &nbsp;Now the punch line question is: if make file &quot;errors&quot; are not true ones, am I installing the library in a correct way from their instructions?</p>]]></content>
			<author>
				<name><![CDATA[wwang328]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3567</uri>
			</author>
			<updated>2015-09-10T15:55:01Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2197#p2197</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 'include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2196#p2196" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>wwang328 wrote:</cite><blockquote><p>&nbsp; &nbsp; &nbsp;IDIR=<br /># -I error: Directory C:\Program Files (x86)\Simply Fortran\mingw-w64\include\ does not exist<br /># -I error: Directory \64\include does not exist</p><p>LDIR=-LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ <br /># -L error: Directory \64\lib does not exist</p></blockquote></div><p>Those &quot;errors&quot; are informational only. There are certain directories that Simply Fortran assumes it should check for additional Fortran 90+ modules or C include files and additional libraries.&nbsp; If the directories aren&#039;t present, a message is left behind in the Makefile.&nbsp; If these missing directories were actually supposed to include a file the compiler needed for your project, compilation wouldn&#039;t complete.&nbsp; &nbsp;The current version of Simply Fortran (2.24) has renamed these as &quot;warnings&quot; to try to alleviate questions about the messages.&nbsp; &nbsp;It&#039;s meant to be useful if, for example, a user has specified a library directory manually that doesn&#039;t exist.</p><p>If you&#039;re having issues computationally, try enabling some of the Fortran diagnostics in Project Options (under the Fortran tab, select &quot;Enable Runtime Diagnostics&quot;) and disabling all optimizations.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-09-10T01:26:11Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2196#p2196</id>
		</entry>
		<entry>
			<title type="html"><![CDATA['include ***.f' makefile error with MINGW in Windows 10 64 system]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2195#p2195" />
			<content type="html"><![CDATA[<p>Hi Jeff, </p><p>&nbsp; &nbsp; I was using NLopt library (see a previous post <a href="http://forums.approximatrix.com/viewtopic.php?pid=2165#p2165)">http://forums.approximatrix.com/viewtop … 165#p2165)</a> for a constrained optimization problem. </p><p>&nbsp; &nbsp; Seemingly, the code is running. However, it&#039;s goofy that constraints of the problem are violated at maxims. Later, I notice that in the make file, there are errors like this:&nbsp; </p><p>&nbsp; &nbsp; &nbsp;IDIR=<br /># -I error: Directory C:\Program Files (x86)\Simply Fortran\mingw-w64\include\ does not exist<br /># -I error: Directory \64\include does not exist</p><p>LDIR=-LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ <br /># -L error: Directory \64\lib does not exist</p><p>&nbsp; &nbsp; &nbsp;What puzzles me is that if this is the cause, shouldn&#039;t be any functions and subroutines in the library not working at all? In a simplest testing project, the library indeed can get the true maxim, even with the existence of same error in make file. </p><p>&nbsp; &nbsp; &nbsp; Am I stuck in an irrelevant error? Thanks a lot!</p>]]></content>
			<author>
				<name><![CDATA[wwang328]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3567</uri>
			</author>
			<updated>2015-09-09T21:14:41Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2195#p2195</id>
		</entry>
</feed>
