>Message: 6

>Date: Fri, 17 Jan 2014 11:29:52 -0800
>From: David Anderson <[email protected]>
>To: [email protected]
>Subject: Re: [boinc_dev] Android linking bombs out on -lpthreads error
>    (solved)
>Message-ID: <[email protected]>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>I removed the -lpthread from api/Makefile.am.
>Everything still builds on Scientific Linux.
>-- David

Really NACK on this.

Please STOP jocking with flags.
libboinc_api.so is actually using threads?

YES.

so SHOULD be linked against them.

Android complains? So please make and IF and add it only for system that 
differs from android.

The fact that your system actually builds the library correctly withtout 
linking the correct flags can have many reasons:
- you are using a libc version < 2.17
- your system suck
- your compiler suck.
- you are making a shared library, did you try to link to this library ONE 
application using it?
- you don't make the right package in the right way.

When you make a SHARED library you NEED to link the required libraries against 
it, otherwise every program that will link your package will have many linking 
errors and will be forced to link against the libraries you forgot.

this error is from this evening
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `boinc_app_key_press(int, int)'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutSwapBuffers'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutStrokeCharacter'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glEnd'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glEnable'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glColor4fv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glLineWidth'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glPopAttrib'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `gluCylinder'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutInitWindowSize'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glMatrixMode'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glDisable'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glColor4d'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutFullScreen'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glRotated'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glVertex3d'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutInit'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutDisplayFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glPushAttrib'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glLoadIdentity'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glColor3d'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutInitWindowPosition'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `app_graphics_resize(int, int)'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glShadeModel'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glListBase'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `app_graphics_render(int, int, double)'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glTexCoord2f'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutReshapeFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glBlendFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glBindTexture'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glOrtho'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glDepthMask'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glTranslatef'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutStrokeWidth'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glCallLists'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glPixelStorei'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glGetIntegerv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glPointSize'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutKeyboardUpFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `gluDeleteQuadric'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `boinc_app_mouse_move(int, int, int, int, int)'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `boinc_app_mouse_button(int, int, int, int)'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glScalef'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `app_graphics_init()'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glColor4f'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glMaterialfv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutStrokeRoman'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glRasterPos3d'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutCreateWindow'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glRotatef'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutMouseFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutMotionFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glBegin'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glNormal3fv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glVertex3f'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutGet'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `gluBuild2DMipmaps'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glPushMatrix'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutKeyboardFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutTimerFunc'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `boinc_app_key_release(int, int)'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glColor3f'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glGetDoublev'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glVertex3fv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutInitDisplayMode'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glPopMatrix'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `gluLookAt'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glVertex2f'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `gluProject'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glTexParameteri'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `gluSphere'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `gluNewQuadric'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glGenTextures'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libboinc_graphics2.so: 
undefined reference to `glutMainLoop'


and I get many and many of this kind of errors just because YOU lack in adding 
the required flags when building.

the answer isn't "the system builds so it is ok"
http://xkcd.com/303/ (please go with the mouse over the picture for the funny 
joke)


because when the generic x app will link against it will fail badly in linking.
and I don't think you may want to move the problem from boinc -> boinc 
applications.


In the last few months as a Debian Maintainer I learn a lot about libraries, 
and I'm still learning, just because upstream developers doesn't care at all 
about this kind of stuff.

I didn't read them but they should be a good place to start
http://www.akkadia.org/drepper/dsohowto.pdf
https://www.nth-dimension.org.uk/pub/BTL.pdf

You are making a graphic library and you don't link at all the required gl 
stuff.

You make a library using pthread and you don't link them,

you change the API/ABI and you don't bump the SONAME (this is also a debian 
fault, seems that every app should STATICALLY link boinc, just because you 
change the api/abi too frequently)

the latest boinc-app-seti upload has just been because the ABI had changed and 
a rebuild was needed to stop it segfaulting
http://packages.qa.debian.org/b/boinc-app-seti.html

Sorry, I tried to be polite, excluse me if I didn't, but this kind of troubles 
can be avoided by learning how to properly link packages between each others.

(I can still be wrong somewhere, please point me where the errors are, since I 
started contributing a few months ago, and I'm learning everything in my spare 
time)

Have a nice and warm weekend!

Gianfranco, a debian maintainer trying to make debian patches flow in the 
upstream boinc and getting them rejected

P.S. In the next upload I'll patch again boinc, no problem

>
>On 17-Jan-2014 10:51 AM, Carl Christensen wrote:
>> OK, think I figured it out -- the problem is in the libboinc_api library -- 
>> in
>> the Makefile.am there's a reference in LDFLAGS to use -lpthread ---- which 
>> isn't
>> necessary on Android, but it seems to force all of my build systems libtools 
>> etc
>> to try and look for a (non-existing on Android) -lpthread.....
>>
>> I'm sure other Android BOINC app makers will run into this, can the 
>> Makefile.am
>> be modified to take that out if Android ie "ifndef ARM_ANDROID" or whatever?
>>
>> lib_LTLIBRARIES = libboinc_api.la libboinc_api_la_SOURCES = $(api_files)
>> libboinc_api_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number
>> $(LIBBOINC_VERSION) -lpthread _______________________________________________
>> boinc_dev mailing list [email protected]
>> http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, 
>> visit
>> the above URL and (near bottom of page) enter your email address.
>>
>
>
>------------------------------
>
>Subject: Digest Footer
>
>_______________________________________________
>boinc_dev mailing list
>[email protected]
>http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
>
>
>------------------------------
>
>End of boinc_dev Digest, Vol 116, Issue 5
>*****************************************
>
>
> 
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to