Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please provide a SONAME #29

Open
ghost opened this issue Jul 27, 2015 · 13 comments · May be fixed by #65
Open

please provide a SONAME #29

ghost opened this issue Jul 27, 2015 · 13 comments · May be fixed by #65

Comments

@ghost
Copy link

ghost commented Jul 27, 2015

Originally reported on Google Code with ID 29

Can you please provide a SONAME for the library?

Installing something in usr/lib without a SONAME is so painful.

Reported by costamagna.gianfranco on 2015-02-10 15:37:26

@ghost ghost self-assigned this Jul 27, 2015
@ghost
Copy link
Author

ghost commented Jul 27, 2015

thanks

Reported by costamagna.gianfranco on 2015-02-10 15:37:31

@ghost
Copy link
Author

ghost commented Jul 27, 2015

This is committed, along with some other minor tweaks (warning messages and the CFLAGS
bits you asked for in issue 28) in r194.

I gave the libraries identical names to the files that the build system creates:
libcld2_dynamic.so
libcld2_full.so
libcld2.so

Reported by [email protected] on 2015-02-12 11:27:21

  • Status changed: Fixed

@ghost
Copy link
Author

ghost commented Jul 27, 2015

nope, you should give something like 0.0.0

something like this :)
gcc -shared -Wl,-soname,libmystuff.so.1 \
    -o libmystuff.so.1.0.1 a.o b.o -lc

(cmake handles it automatically, I'm trying to port the build script right now)

BTW not only chromium is using it, now also poedit!

thanks for the fixes so far!

Reported by costamagna.gianfranco on 2015-02-12 11:38:00

@ghost
Copy link
Author

ghost commented Jul 27, 2015

So, CLD2 doesn't have release versions like this. The closest that we have is the date
of the data files, generally speaking. We could add a ".1" to make things happy, but
that's really about the only sensible thing at the moment without actually having a
"x.y.z." versioning scheme, which the project currently lacks.

I didn't mean to imply with my comments in issue #28 that *only* Chromium uses CLD;
it's certainly not intended to be just for Chromium. The metapoint is that most of
the projects that incorporate CLD that I'm currently aware of compile it at the same
time as everything else, meaning they don't end up with a standalone CLD library to
link at runtime. It's a totally valid use case, though, which is why I'm happy to take
a makefile improvement :)

I'd like Dick's thoughts on versioning before committing to make it a ".1", because
we're likely stuck with whatever we do there for the forseeable future. I'd hate to
cause pain for the consumers of the library by mangling the version.

Reported by [email protected] on 2015-02-12 12:12:28

  • Status changed: Accepted

@ghost
Copy link
Author

ghost commented Jul 27, 2015

Ok, I fixed some issues, and created the cmake file.

It wasn't trivial, since your build scripts are *far* from ideal.

Now the cmake is *exactly* as the build scripts, just I avoided inclusion of headers
files, since when you build the corresponding cc file the correspondant header is already
included in the #include directive.

Now of course it is working, just with a *FULL* explanation about your system, I'll
be glad to reduce it a lot, by using the created libraries for testing, instead of
rebuilding everything again from scratch.

this will simplify a lot the CMake file. 

Reported by costamagna.gianfranco on 2015-02-12 16:27:00


- _Attachment: [CMakeLists.txt](https://storage.googleapis.com/google-code-attachments/cld2/issue-29/comment-5/CMakeLists.txt)_

@ghost
Copy link
Author

ghost commented Jul 27, 2015

oops, I did a typo

to build you can just
mkdir build
cd build
cmake ..
make -j whatever

of course we can add flags to build only parts of the cld2, like
-DENABLE_TESTS=ON or something like this.

tests still need to be run manually (I don't know how to handle pipes with cmake)

Reported by costamagna.gianfranco on 2015-02-12 16:33:52


- _Attachment: [CMakeLists.txt](https://storage.googleapis.com/google-code-attachments/cld2/issue-29/comment-6/CMakeLists.txt)_

@ghost
Copy link
Author

ghost commented Jul 27, 2015

ping :-)

what about providing a soname just if some cmake flag is enabled?

Reported by costamagna.gianfranco on 2015-03-03 06:54:03

@ghost
Copy link
Author

ghost commented Jul 27, 2015

changing SHARED to STATIC in CmakeLists.txt makes cmake build static libraries

Reported by costamagna.gianfranco on 2015-03-04 16:37:25

@ghost
Copy link
Author

ghost commented Jul 27, 2015

Ping again, can you please just provide a SONAME like the svn revision? 1.0.194 for
svn revision 194 for example.

You can change it at each commit, so everyone is happy (and I can create some cmake
stuff to automatically add it)

let me know, thanks

(this is a showstopper for Debian packaging)

Reported by costamagna.gianfranco on 2015-03-26 16:41:46

@ghost
Copy link
Author

ghost commented Jul 27, 2015

Adding a new cmake file version, building faster (I link libraries rather than rebuilding
the all files each time for the testsuite) and adding a SONAME like

0.0.194 where 194 is the svn revision

Reported by costamagna.gianfranco on 2015-03-30 14:45:20


- _Attachment: [CMakeLists.txt](https://storage.googleapis.com/google-code-attachments/cld2/issue-29/comment-10/CMakeLists.txt)_

@ghost
Copy link
Author

ghost commented Jul 27, 2015

Thanks for the cmake file.  It's possible to actually build this project now.

Reported by [email protected] on 2015-05-29 14:22:55

@ghost
Copy link
Author

ghost commented Jul 27, 2015

Jason, can you take a look at what it would take to add this in? I don't have any experience
with CMake but it sounds like it's useful.

Reported by [email protected] on 2015-05-29 14:49:38

@ghost
Copy link
Author

ghost commented Jul 27, 2015

Actually this is part of Debian already, but I changed the cmake to use only once the
svn version
https://sources.debian.net/src/cld2/0.0.0~svn194-1/CMakeLists.txt/

Reported by costamagna.gianfranco on 2015-05-29 16:16:17

tastytea added a commit to tastytea/cld2 that referenced this issue May 22, 2021
Changes from to the original patch:
  - Set the standard to C++98
  - Use correct installation directory for libraries

The last recorded SVN revision in the git log is 196, Debian uses
0.0.197 as version for their 2015-08-06 snapshot. The only change since
then was a typo in the readme, so I'm keeping the version.

Author: Gianfranco Costamagna <[email protected]>
Forwarded: CLD2Owners#29
Forwarded: https://sources.debian.org/src/cld2/0.0.0-git20150806-9/debian/patches/add-cmake-file.patch/
Closes: CLD2Owners#29
@tastytea tastytea linked a pull request May 22, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants