Undefined reference to __sync_fetch_and_add_4

This forum is about all development around libVLC.
Claupacius
Blank Cone
Blank Cone
Posts: 12
Joined: 01 Dec 2011 18:08

Undefined reference to __sync_fetch_and_add_4

Postby Claupacius » 19 May 2012 13:38

Hi,
I'm trying to make a cross-compilation on Kubuntu.

Everything went smooth until make step.

I get an error :
In function vlc_atomic_add
undefined reference to __sync_fetch_and_add_4.
What can be a problem ?

Thank you in advance.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Undefined reference to __sync_fetch_and_add_4

Postby Jean-Baptiste Kempf » 21 May 2012 18:14

You need to force march=pentium2 I think.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Claupacius
Blank Cone
Blank Cone
Posts: 12
Joined: 01 Dec 2011 18:08

Re: Undefined reference to __sync_fetch_and_add_4

Postby Claupacius » 24 May 2012 14:35

Thank you very much for the reply.
This parameter eliminated a problem with linking.

However, during compilation of grain video filter, gcc spit out the following error :

BlockBlendSse2 - undeclared

I think this error is linked to the parameter "pentium2", where SSE2 does not exist yet.
After this error the build process is stopped.

How can I overcome this problem ? Manually remove a compilation of this module ?
Thank you in advance

Claupacius
Blank Cone
Blank Cone
Posts: 12
Joined: 01 Dec 2011 18:08

Re: Undefined reference to __sync_fetch_and_add_4

Postby Claupacius » 24 May 2012 15:29

Ok, I tried to change the parameter to "pentium4" and it succeeded.
Thank you once again.

jml674
Blank Cone
Blank Cone
Posts: 38
Joined: 03 Feb 2010 19:54
Location: France

Re: Undefined reference to __sync_fetch_and_add_4

Postby jml674 » 19 Jun 2012 18:50

Sorry to be a pain but I ran into same issue, can you explicitly describe where/how you set the march flag ?

thanks in advance !

jml674
Blank Cone
Blank Cone
Posts: 38
Joined: 03 Feb 2010 19:54
Location: France

Re: Undefined reference to __sync_fetch_and_add_4

Postby jml674 » 20 Jun 2012 07:51

Figured it out: adding CFLAG env (-march=pentium4) before running configure script.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Undefined reference to __sync_fetch_and_add_4

Postby Jean-Baptiste Kempf » 23 Jun 2012 16:31

Figured it out: adding CFLAG env (-march=pentium4) before running configure script.
pentium should be enough.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

runner0502
Blank Cone
Blank Cone
Posts: 27
Joined: 25 Jun 2012 12:35
VLC version: 2.1.0-git
Operating System: windows, MacOS,linux
Location: China

Re: Undefined reference to __sync_fetch_and_add_4

Postby runner0502 » 25 Jun 2012 13:23

after add cflags env , there is another error.

/modules/access/file.c:186: error: implicit declaration of function ‘S_ISSOCK


i try pentium4 or pentium2 or pentium, but same result.
code for fun

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: Undefined reference to __sync_fetch_and_add_4

Postby edwardw » 28 Jun 2012 13:07

after add cflags env , there is another error.

/modules/access/file.c:186: error: implicit declaration of function ‘S_ISSOCK


i try pentium4 or pentium2 or pentium, but same result.
Fixed in latest git, I think.

runner0502
Blank Cone
Blank Cone
Posts: 27
Joined: 25 Jun 2012 12:35
VLC version: 2.1.0-git
Operating System: windows, MacOS,linux
Location: China

Re: Undefined reference to __sync_fetch_and_add_4

Postby runner0502 » 02 Jul 2012 16:56

after add cflags env , there is another error.

/modules/access/file.c:186: error: implicit declaration of function ‘S_ISSOCK


i try pentium4 or pentium2 or pentium, but same result.
Fixed in latest git, I think.

yes, latest git fix this error. thanks.
code for fun


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 3 guests