LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2014, 11:59 PM   #1
angelteers
LQ Newbie
 
Registered: Apr 2014
Posts: 1

Rep: Reputation: Disabled
hello,everyone. I have some questions,can you help me?


gradient.c.text+0x14ef): undefined reference to `__sync_bool_compare_and_swap_8'
gradient.c.text+0x159f): undefined reference to `__sync_bool_compare_and_swap_8'
/tmp/cc4Jgy73.o: In function `grd_spupgrad':
gradient.c.text+0x1747): undefined reference to `__sync_bool_compare_and_swap_8'
gradient.c.text+0x1a2e): undefined reference to `__sync_bool_compare_and_swap_8'
/tmp/cc4Jgy73.o: In function `grd_flupgrad':
gradient.c.text+0x1c13): undefined reference to `__sync_bool_compare_and_swap_8'
/tmp/cc4Jgy73.o:gradient.c.text+0x1d94): more undefined references to `__sync_bool_compare_and_swap_8' follow
collect2: ld reback 1
make: *** [wapiti] error 1


now the program is below:
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "wapiti.h"
#include "gradient.h"
#include "model.h"
#include "options.h"
#include "progress.h"
#include "sequence.h"
#include "tools.h"
#include "thread.h"
#include "vmath.h"

/* atm_inc:
* Atomically increment the value pointed by [ptr] by [inc]. If ATM_ANSI is
* defined this NOT atomic at all so caller must have to deal with this.
*/
#ifdef ATM_ANSI
static inline
void atm_inc(double *value, double inc) {
*value += inc;
}
#else
static inline
void atm_inc(volatile double *value, double inc) {
while (1) {
volatile union {
double d;
uint64_t u;
} old, new;
old.d = *value;
new.d = old.d + inc;
uint64_t *ptr = (uint64_t *)value;
if (__sync_bool_compare_and_swap(ptr, old.u, new.u))
break;
}
}
#endif

The bold runing have mistake

Last edited by angelteers; 04-29-2014 at 03:16 AM. Reason: I am running wapiti which can train and label data.I just modify some programs
 
Old 04-29-2014, 12:07 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,252

Rep: Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685
Please place code / data in [code][/code] tags to preserve the formatting and readability.

Also, I see no question??
 
Old 04-29-2014, 12:12 AM   #3
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 6,403
Blog Entries: 6

Rep: Reputation: Disabled
Hi:

Welcome to Linux Questions, angelteers

This looks like code errors a bug) and if I am mistaken on that than what are you trying to complile?

What distribution are you running?

Code tags help us to read output

Code:
gradient.c.text+0x14ef): undefined reference to `__sync_bool_compare_and_swap_8'
gradient.c.text+0x159f): undefined reference to `__sync_bool_compare_and_swap_8'
/tmp/cc4Jgy73.o: In function `grd_spupgrad':
gradient.c.text+0x1747): undefined reference to `__sync_bool_compare_and_swap_8'
gradient.c.text+0x1a2e): undefined reference to `__sync_bool_compare_and_swap_8'
/tmp/cc4Jgy73.o: In function `grd_flupgrad':
gradient.c.text+0x1c13): undefined reference to `__sync_bool_compare_and_swap_8'
/tmp/cc4Jgy73.o:gradient.c.text+0x1d94): more undefined references to `__sync_bool_compare_and_swap_8' follow
collect2: ld reback 1
make: *** [wapiti] error 1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New Linux user with a few questions - Networking and Drivers questions Techsniffer Linux - Newbie 9 04-04-2012 01:21 PM
Make questions and ARCH questions for gentoo/calculate linus72 Calculate 5 04-09-2010 01:53 AM
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 12:50 PM
LXer: Questions Answered, Questions Posed - What Happened? LXer Syndicated Linux News 0 05-14-2007 03:46 PM
window manager questions and/or theme questions t3gah Linux - Software 2 02-27-2005 05:16 PM


All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration