krime / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
1 stars 0 forks source link

Wrong library permission after building #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

In the latest 1.2.1, after building and install serf on my Fedora box I've 
found that libsef-1.so.0.0.0 has 644 permission.

I think it's wrong, 755 should be the proper one. See the patch in attachment.

Thanks.

Original issue reported on code.google.com by Cickumqt on 13 Jun 2013 at 12:21

Attachments:

GoogleCodeExporter commented 9 years ago
644 is not wrong for libraries.  You don't execute them.  The exception, on 
Linux, is the runtime linker (/lib/ld-linux.so.2 and/or 
/lib64/ld-linux-x86-64.so.2), which _is_ intended to be directly executable.

Are other libraries mode 755 on Fedora?  That seems ... strange.  Why would 
they do that?

(In other news, it amuses me that your 755 patch is 644 bytes long.)

Original comment by peters@p12n.org on 13 Jun 2013 at 8:32

GoogleCodeExporter commented 9 years ago
Apparently executable bit is required for libraries at least on HP-UX.

Original comment by Arfrever...@gmail.com on 13 Jun 2013 at 9:09

GoogleCodeExporter commented 9 years ago
Well.... All libraries under this dir are 755 mode.

Some refers:

1) 
http://unix.stackexchange.com/questions/40587/why-are-shared-libraries-executabl
e

2) Quoted from https://bugs.freedesktop.org/show_bug.cgi?id=26312:

"The Makefile should install the libraries with 755 permissions rather than 
644.  That's standard practice, and required when building RPMs on Fedora to 
get a debuginfo package."

Original comment by Cickumqt on 15 Jun 2013 at 3:25

GoogleCodeExporter commented 9 years ago
I like the idea of running the library to get version information.

Since this doesn't seem critical, and I'd prefer to fix SConstruct rather than 
only the 1.2.x branch, I'll mark this as an enhancement. Maybe somebody can 
figure out the right linker bits to define an entrypoint (I doubt we can call 
it main()).

Then we can have a per-platform choice of 644 or 755 for the .so. (as bug 26312 
noted, the .a does not require +x perms).

Original comment by gstein on 15 Jun 2013 at 4:54