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

Error while setting up the local-environment (undefined reference to `uuid_generate') #805

Open
BhargavaRam123 opened this issue Jan 21, 2025 · 5 comments
Assignees

Comments

@BhargavaRam123
Copy link

here are the steps i followed

  1. first i went to the readme and followed the given instructions like installing the following packages: sudo apt-get install libqt5gui5 qtbase5-dev qtwebengine5-dev \ libqt5svg5-dev qt5-image-formats-plugins aria2 \qttools5-dev-tools qtchooser qt5-qmake \qtbase5-dev-tools.
  2. Then i noticed kiwix-desktop also depends on other libraries then i come to know about the kiwix-build . Then i cloned the repo locally and followed the setup instruction in the readme then i ran the command kiwix-build kiwix-desktop --config native_static
  3. now i went back to the kiwix-desktop directory then i exported the package config path and ran the following commands qmake . and make.
  4. Now this is where the error occured, error description
/usr/bin/ld: /home/bhargav/Pictures/projects/kiwix-build/BUILD_native_static/INSTALL/lib/x86_64-linux-gnu/libxapian.a(uuids.o): in function `Uuid::generate()':
(.text+0x27): undefined reference to `uuid_generate'
collect2: error: ld returned 1 exit status
make: *** [Makefile:464: kiwix-desktop] Error 1

os: ubuntu 24.04.1

@asashnov
Copy link
Contributor

I'm on Ubuntu 22.04, but my answer still may be helpful:

$ apt search libxapian
...
libxapian30/jammy 1.4.18-4 amd64
  Search engine library

$ apt show libxapian30 | grep Depend

Depends: libc6 (>= 2.34), libgcc-s1 (>= 3.4), libstdc++6 (>= 11), libuuid1 (>= 2.16), zlib1g (>= 1:1.1.4)

Is libuuid1 installed in your system?

@BhargavaRam123
Copy link
Author

yes libuuid1 is already installed in my system.

apt search libxapian
Sorting... Done
Full Text Search... Done
libxapian-dev/noble,now 1.4.22-1build1 amd64 [installed]
  Development files for Xapian search engine library

libxapian-java/noble 1.4.22-1build5 all
  Xapian search engine interface for Java

libxapian-java-doc/noble 1.4.22-1build5 all
  Xapian search engine interface for Java (documentation)

libxapian-jni/noble 1.4.22-1build5 amd64
  Xapian search engine interface for Java (JNI library)

libxapian30/noble,now 1.4.22-1build1 amd64 [installed,automatic]
  Search engine library

apt show libxapian30 | grep Depend

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Depends: libc6 (>= 2.39), libgcc-s1 (>= 3.4), libstdc++6 (>= 13.1), libuuid1 (>= 2.16), zlib1g (>= 1:1.1.4)

dpkg -l | grep libuuid1
ii  libuuid1:amd64                                2.39.3-9ubuntu6.1                        amd64        Universally Unique ID library

@kelson42
Copy link
Contributor

I guess this is more a problem with kiwix-build. @veloman-yunkan Do you have an idea?

@kelson42 kelson42 transferred this issue from kiwix/kiwix-desktop Jan 27, 2025
@kelson42 kelson42 added the bug label Jan 27, 2025
@asashnov
Copy link
Contributor

Is package uuid-dev installed?

Does it contain uuid_generate definition inside its static library?

$ nm /usr/lib/x86_64-linux-gnu/libuuid.a | grep 'uuid_generate$'
0000000000000c20 T uuid_generate

@BhargavaRam123
Copy link
Author

yes uuid-dev is already installed and uuid_generate definition is also present.
Update:
instead of using kiwix_build i directly installed libzim and libkiwix into my system for kiwix desktop and it worked.

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

No branches or pull requests

4 participants