[LU-5541] improve liblustreapi build Created: 25/Aug/14 Updated: 31/Jan/22 Resolved: 25/Jan/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.11.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Frank Zago (Inactive) | Assignee: | Nathaniel Clark |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Rank (Obsolete): | 15425 | ||||||||||||||||||||||||
| Description |
|
Currently liblustreapi export all its symbols to the application, some of which are undesirable, such as do_ioctl, dump, ... Use the linker to clean that up. Use libtool to build the shared library. |
| Comments |
| Comment by Frank Zago (Inactive) [ 25/Aug/14 ] |
|
(abandonned) http://review.whamcloud.com/11581 |
| Comment by Frank Zago (Inactive) [ 25/Aug/14 ] |
|
Somewhat related to these patches, there are several archives that are installed by the rpms that look unnecessary: /usr/lib64/libcfsutil.a /usr/lib64/libiam.a /usr/lib64/liblustreapi.a /usr/lib64/libptlctl.a If used, these should probably be replaced by a shared library. |
| Comment by Frank Zago (Inactive) [ 28/Aug/14 ] |
|
http://review.whamcloud.com/11625 |
| Comment by James A Simmons [ 04/Nov/14 ] |
|
With the base patch worked out we should discuss what functions to export. I'm in agreement with Henri that all functions to exports should began with llapi_* for liblustreapi. Anyone disagree? |
| Comment by Frank Zago (Inactive) [ 04/Nov/14 ] |
|
There is some functions that start with llapi_* that shouldn't be exported (like llapi_printf, llapi_chomp_string, all the json functions, ...) |
| Comment by James A Simmons [ 26/Jan/16 ] |
|
Frank do you have a list of llapi_* functions not to export. |
| Comment by Frank Zago (Inactive) [ 26/Jan/16 ] |
|
No, but you can modify the linker script to not export anything, then add the missing functions as the linker fails to link the various programs. You can then compare that list with the list of all llapi functions obtained previously with nm liblustreapi.so | grep " T llapi_" However I believe that the function names should be whitelisted instead of blacklisting some names. |
| Comment by James A Simmons [ 26/Jan/16 ] |
|
I'm seeing this when building on Ubuntu and only on Ubuntu. gcc -DHAVE_CONFIG_H -I. -I../.. -include /tmp/jsimmons-ppc/rpmbuild/usr/src/lustre-2.7.65/debian/tmp/modules-deb/usr It only happens there. Frank have any ideas why? |
| Comment by Frank Zago (Inactive) [ 26/Jan/16 ] |
|
I guess it's because it's a more recent version of autoconf than elsewhere. |
| Comment by Frank Zago (Inactive) [ 28/Jan/16 ] |
|
James, I have built lustre on Ubuntu 15.10 with the 2 patches above plus http://review.whamcloud.com/#/c/17581, with no problem. |
| Comment by James A Simmons [ 28/Jan/16 ] |
|
Did you do a make deb as well? Doing make does work but it fails for make debs. I do suspect it is a setup issue. |
| Comment by Frank Zago (Inactive) [ 28/Jan/16 ] |
|
No, I didn't do that. It's possible that some files are missing in automake. For instance, if you do a "make dist", can you build from the generated tar file? |
| Comment by James A Simmons [ 03/Feb/16 ] |
|
I have attempted to build on my Ubuntu 15 home box but now it will no longer build due to missing keys. As for our Ubuntu14 platform on Power8 I just think it is totally messed up with the dpkg system. It can't find the liblustreapi.la so it failed to build. This might be specific to our Power8 platform but in any case our admins are working hard to get as far away from Ubuntu as possible to using RHEL7. So by the time this patch lands it will be a non-issue. With all the problems we should declare Ubuntu support dead. |
| Comment by Gerrit Updater [ 24/Aug/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/28701 |
| Comment by Gerrit Updater [ 28/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/11625/ |
| Comment by Gerrit Updater [ 28/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/11643/ |
| Comment by Alex Zhuravlev [ 28/Aug/17 ] |
|
with this patch landed I can't run from the build tree (as host and VM has different paths):
|
| Comment by James A Simmons [ 28/Aug/17 ] |
|
You need to run autogen.sh; ./configure .... Oleg works like this as well and I made sure he could continue his work flow. |
| Comment by Alex Zhuravlev [ 28/Aug/17 ] |
|
hmm, that didn't work for me. just tried. |
| Comment by James A Simmons [ 28/Aug/17 ] |
|
Does it work with a fresh checkout? What is your environment you are working in? |
| Comment by Alex Zhuravlev [ 28/Aug/17 ] |
|
got the same with a fresh checkout. |
| Comment by Alex Zhuravlev [ 28/Aug/17 ] |
|
--disable-shared worked for me, thanks. |
| Comment by James A Simmons [ 28/Aug/17 ] |
|
AH so you are doing the same environment as Oleg. As a note to people spawning VMs that are read only like Oleg does. You will need to build lustre with ./configure --disable-shared. Since it looks like it is working for Alex we can close this ticket. Future work will be done under LU-9897 |
| Comment by Gerrit Updater [ 29/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/28782 |
| Comment by Gerrit Updater [ 29/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/28783 |
| Comment by James A Simmons [ 29/Aug/17 ] |
|
So does anyone understand how the debian/ubuntu version of libtool works. Its totally different than other systems. |
| Comment by Gerrit Updater [ 31/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28782/ |
| Comment by Gerrit Updater [ 31/Aug/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28783/ |
| Comment by James A Simmons [ 31/Aug/17 ] |
|
BTW just to let people know building Ubuntu 16 is very broken in general for lustre |
| Comment by Gerrit Updater [ 15/Dec/17 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/30562 |
| Comment by James A Simmons [ 15/Dec/17 ] |
|
Okay I managed to get everything to build on Ubuntu17 but now it fails on Ubuntu16. I'm going to need help from debian people here to get that working. |
| Comment by James A Simmons [ 09/Jan/18 ] |
|
Thanks to Thomas Stibor the Ubuntu/Debian build issues have been resolved. |
| Comment by Gerrit Updater [ 14/Jan/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30562/ |
| Comment by Peter Jones [ 14/Jan/18 ] |
|
So is that patch just landed to master the last part of this work? Can the ticket be marked as resolved? |
| Comment by James A Simmons [ 14/Jan/18 ] |
|
One patch left |
| Comment by Gerrit Updater [ 14/Jan/18 ] |
|
James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/30865 |
| Comment by Gerrit Updater [ 25/Jan/18 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30865/ |
| Comment by Peter Jones [ 25/Jan/18 ] |
|
The end of an era |
| Comment by James A Simmons [ 26/Jan/18 ] |
|
Yes. Libraries are sane now!!! |