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

howto build annlib_adaptbx with annlib #770

Open
picca opened this issue Jul 16, 2022 · 12 comments
Open

howto build annlib_adaptbx with annlib #770

picca opened this issue Jul 16, 2022 · 12 comments

Comments

@picca
Copy link

picca commented Jul 16, 2022

Hello, I am preparing a cctbx package with annlib_adaptbx embeded.

My question is how can I build this adaptbx without the annlib which is already available at the system level (package libaa-dev).

thanks for considring.

Fred

@picca
Copy link
Author

picca commented Jul 16, 2022

There is another issue :), the library generated is called ann. but this is a modified version of ann augmented with the ann_adaptor.cpp file. Is it possible to rename this library ann_adaptor in order to avoid a clash when installing the library on the system.

@bkpoon
Copy link
Member

bkpoon commented Jul 16, 2022

One issue is that our annlib is modified to also include self in the list. @nksauter would know more.

From an earlier issue (#460) are you trying to build a Debian package for cctbx? If you point me to your scripts for building, I can help get that sorted out.

@picca
Copy link
Author

picca commented Jul 16, 2022 via email

@bkpoon
Copy link
Member

bkpoon commented Jul 20, 2022

I am preparing for the ACA meeting, so I will not have time to look into this until I am back (around 8/8). Is it possible for me to fork the repository into my gitlab.com organization and make a merge request into the Debian GitLab repository? Or would I have to run the build locally?
It looks like you only have the contents of cctbx_project which does not have all the source. There are additional modules that are added to the source tarball in the releases. I track them in https://github.com/cctbx/cctbx. You do not need all of them, though.

@picca
Copy link
Author

picca commented Jul 27, 2022 via email

@picca
Copy link
Author

picca commented Oct 12, 2022

Hello, I have a question about the annlib test, I try to run it but I do not get the same hash that the one expected.

when I run the sample test it gives

B619FC6D18D5F78F5A55A2D06AD0B03F != E486456DC3A225C40FE8A3A9D9A760E9

All the distance are equals to zero it seems to me correct. the query is just the truncated data file.

I would like to understand what is going on, do you run this test regularly when building cctbx ?, on which platform etc...
I am woindering if the StringIO is identical on linux and windows etc...

thanks for your help.

Frederic

@bkpoon
Copy link
Member

bkpoon commented Oct 12, 2022

I have a build running on salsa.debian.org. Can you tell me where to look for the output to this test? Should I make a PR and then you can tell me where the issues are?

The test is checking the hash to the output from the test. You can try printing the output of exercise_nearest_neighbor() to see if there is a difference with the output from my machine (excercise_nearest_neighbor.txt). I generate the output by adding

with open('excercise_nearest_neighbor.txt', 'w') as f:
  f.write(excercise_nearest_neighbor())

to annlib_adaptbx/annlib_adaptbx/sample.py before the assert.

@picca
Copy link
Author

picca commented Oct 12, 2022 via email

@nksauter
Copy link
Contributor

nksauter commented Oct 12, 2022 via email

@picca
Copy link
Author

picca commented Oct 13, 2022

Ok, I rebuilt an ann Debian package with your default. I can confirm that all test pass now :). It solved also the dials indexing tests. so to solve this issue for real, I need to upload an ann library into Debian with your defaults. The ann library should not be modified. Maybe the best solution is to create a dedicated ann-cctbx library with both symbols instead.

@picca
Copy link
Author

picca commented Oct 13, 2022

In order to avoid a symbol collision with the current ann library, I will create a ANNSELF_INCLUDE and ANNSELF_EXCLUDE name space and patch the annlib code. this way all symbols used by cctbx will be specific to cctbx.

let's try it...

@picca
Copy link
Author

picca commented Oct 14, 2022

Done, now there is libann-cctbx-dev and libann-cctbx0 packages in order to build cctbx. I patched the code in order to link against ann-cctbx instead of ann and replace all the ANN objects with annself_exclude::ANN.

all test passed now. I think that the 2022.9+ds2+~3.11.2+ds1-2
will be the first version which works for our users :)

thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants