Re: problem resolving foreign function (I think)
DJ <[email protected]> Wed, 18 Mar 2015 14:05:02 -0400
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============1896539024== Content-Type: multipart/alternative; boundary="------------090304080000070600090005" This is a multi-part message in MIME format. --------------090304080000070600090005 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit My pleasure. I use clsql + mysql heavily in the app I am developing in CL. So I am grateful for the existence of clsql and happy to lend a hand. I don't claim to understand the possible implications of such a change to ld flags; I trust that you guys do. I only analysed the problem deeply enough to convince me that I should post what I found. As I mentioned, my knowledge of linux development is sketchy (but increasing). When I ran into this problem I realized that I had put off learning about the gory details for too long. This has motivated me to start reading about ELF format, gcc, ld, gnu make and so on. I was already well aware that lots of abstractions leak up to the Common Lisp level, so I shall spend the next few weeks writing some C again. Then perhaps I shall stand a fighting chance, particularly with ffi stuff in CL.... Best, - DJ - On 15-03-18 11:01 AM, Russ Tyndall wrote: > First congrats on solving the problem, hopefully we can get your > change committed soon so that others do not also fall victim. > > I see this is something that Kevin added as part of the most recent > 6.6.0 release. > http://git.b9.com/?p=clsql.git;a=commit;h=a646f558b54191eda1d64f2926eee7b4fa763f89 > > Based on the docs you sent it seems like the following will cause the > file to build on your system with no loss of security (because it says > "Shared libraries already do this (-fPIC)") > > `DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie` > > Both options seem build/load on my Ubuntu 64bit system, so if this > solves your problem, I will commit a patch fixing this option in the > build file. > > Thanks so much for figuring this out, I am sure others will be > affected and it was invisible to me. > > Cheers, > Russ Tyndall > Acceleration.net > > >> I see that the -pie flag is set for ld because of this line in >> db-mysql/Makefile: >> >> LDFLAGS:=$(LDFLAGS) $(shell env >> DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get >> LDFLAGS | sed "s/-Wl\|,/ /ig" >> > > > > _______________________________________________ > CLSQL mailing list > [email protected] > http://lists.b9.com/cgi-bin/mailman/listinfo/clsql --------------090304080000070600090005 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable <html> <head> <meta content=3D"text/html; charset=3Dwindows-1252" http-equiv=3D"Content-Type"> </head> <body bgcolor=3D"#FFFFFF" text=3D"#000000"> My pleasure. I use clsql + mysql heavily in the app I am developing in CL. So I am grateful for the existence of clsql and happy to lend a hand.<br> <br> I don't claim to understand the possible implications of such a change to ld flags; I trust that you guys do. I only analysed the problem deeply enough to convince me that I should post what I found.<br> <br> As I mentioned, my knowledge of linux development is sketchy (but increasing). When I ran into this problem I realized that I had put off learning about the gory details for too long. This has motivated me to start reading about ELF format, gcc, ld, gnu make and so on. I was already well aware that lots of abstractions leak up to the Common Lisp level, so I shall spend the next few weeks writing some C again. Then perhaps I shall stand a fighting chance, particularly with ffi stuff in CL....<br> <br> Best,<br> <br> - DJ -<br> <br> <br> <div class=3D"moz-cite-prefix">On 15-03-18 11:01 AM, Russ Tyndall wrote:<br> </div> <blockquote cite=3D"mid:[email protected]" type=3D"ci= te"> <meta content=3D"text/html; charset=3Dwindows-1252" http-equiv=3D"Content-Type"> First congrats on solving the problem, hopefully we can get your change committed soon so that others do not also fall victim.<br> <br> I see this is something that Kevin added as part of the most recent 6.6.0 release.<br> <a moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext" href=3D"http://git.b9.com/?p=3Dclsql.git;a=3Dcommit;h=3Da646f558b54191eda= 1d64f2926eee7b4fa763f89">http://git.b9.com/?p=3Dclsql.git;a=3Dcommit;h=3D= a646f558b54191eda1d64f2926eee7b4fa763f89</a><br> <br> Based on the docs you sent it seems like the following will cause the file to build on your system with no loss of security (because it says "Shared libraries already do this=A0 (-fPIC)")<br> <br> `DEB_BUILD_MAINT_OPTIONS=3Dhardening=3D+all,-pie`<br> <br> Both options seem build/load on my Ubuntu 64bit system, so if this solves your problem, I will commit a patch fixing this option in the build file.<br> <br> Thanks so much for figuring this out, I am sure others will be affected and it was invisible to me.<br> <br> Cheers,<br> Russ Tyndall<br> Acceleration.net<br> <br> <br> <blockquote cite=3D"mid:[email protected]" type=3D"cite"> = I see that the -pie flag is set for ld because of this line in db-mysql/Makefile:<br> <br> <blockquote>LDFLAGS:=3D$(LDFLAGS) $(shell env DEB_BUILD_MAINT_OPTIONS=3Dhardening=3D+all dpkg-buildflags --ge= t LDFLAGS | sed "s/-Wl\|,/ /ig" </blockquote> </blockquote> <br> <br> <fieldset class=3D"mimeAttachmentHeader"></fieldset> <br> <pre wrap=3D"">_______________________________________________ CLSQL mailing list <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:[email protected]">CLSQL@= b9.com</a> <a class=3D"moz-txt-link-freetext" href=3D"http://lists.b9.com/cgi-bin/ma= ilman/listinfo/clsql">http://lists.b9.com/cgi-bin/mailman/listinfo/clsql<= /a> </pre> </blockquote> <br> </body> </html> --------------090304080000070600090005-- --===============1896539024== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ CLSQL mailing list [email protected] http://lists.b9.com/cgi-bin/mailman/listinfo/clsql --===============1896539024==--