Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Label at end of compound statement" error, MacPorts, CGMiner
    text
    copied!<p>I'm trying to install cgminer on OS X using MacPorts. It's been nothing but trouble since the start, but with the proper tools, common sense, and the Internet I've been able to get this far. Essentially, the compilation jams on <em>sudo make install</em> indicating a jam at line 956 of util.c - here is the text of the terminal output:</p> <pre><code> CC cgminer-cgminer.o CC cgminer-util.o util.c: In function ‘nanosleep_abstime’: util.c:956: error: label at end of compound statement make[1]: *** [cgminer-util.o] Error 1 make: *** [install-recursive] Error 1 </code></pre> <p>And here is the contents of the cgminer copy of util.c opened in Xcode 4.6.3, cropped at nano sleep_abstime and with a comment inserted designating line 956:</p> <pre><code>static void nanosleep_abstime(struct timespec *ts_end) { uint64_t now_ns, end_ns, diff_ns; struct timespec ts_diff; struct timeval now; end_ns = timespec_to_ns(ts_end); gettimeofday(&amp;now, NULL); now_ns = timeval_to_ns(&amp;now); if (unlikely(now_ns &gt;= end_ns)) goto out; diff_ns = end_ns - now_ns; ns_to_timespec(&amp;ts_diff, diff_ns); nanosleep(&amp;ts_diff, NULL); out: #ifdef WIN32 timeEndPeriod(1); #endif } // LINE 956 #endif </code></pre> <p>Now, I'm not in any way, shape or form familiar with Unix/Linux commands or terminal in the least - I feel like a fish out of water, so everything I've learned I've had to learn by doing it wrong and then learning the hard way. However, I've read online that this error was solved by ending a label that was unresolved at the last portion of a function - that is, if the function ended at default:, a break; was placed between it and the end brace to resolve the error.</p> <p>However, I have tried placing the break after the WIN32 #endif, inside the #ifdef preprocessor argument, and preceding it, directly after out:. All continue to fail the compiler. Any solutions for this? I feel like the solution is staring me in the face. </p> <p>Here is relevant config/version information of my setup:</p> <pre><code>OS X 10.8.4 (12E55) Xcode 4.6.3 w/ Command Line Tools installed MacPorts version 2.2.0 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload