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

Linking fails on Raspberry Pi due to missing dlsym #4064

Closed
danielmewes opened this issue Apr 15, 2015 · 17 comments
Closed

Linking fails on Raspberry Pi due to missing dlsym #4064

danielmewes opened this issue Apr 15, 2015 · 17 comments
Assignees
Labels
Milestone

Comments

@danielmewes
Copy link
Member

Reported by @zaherg on Twitter in https://twitter.com/zaherg/status/588220329249636352:

/usr/bin/ld: /home/pi/src/rethinkdb-2.0.0-1/build/external/icu_54.1/lib/libicuuc.a(putil.ao): undefined reference to symbol 'dlsym@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libdl.so.2: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
src/build.mk:350: recipe for target 'build/release_system/rethinkdb' failed
make[1]: *** [build/release_system/rethinkdb] Error 1
Makefile:52: recipe for target 'make' failed
make: *** [make] Error 2

He said earlier that he was following these instructions http://rethinkdb.com/docs/install/raspbian/

@danielmewes danielmewes added this to the 2.0.x milestone Apr 15, 2015
@danielmewes
Copy link
Member Author

Just chaining -ldl behind

RT_LDFLAGS += $(V8_LIBS) $(PROTOBUF_LIBS) $(PTHREAD_LIBS) $(MALLOC_LIBS) $(ICUI18N_LIBS) $(ICUUC_LIBS) $(ICUDATA_LIBS)

in src/build.mk didn't help. https://twitter.com/zaherg/status/588436080430620674

@AtnNn
Copy link
Member

AtnNn commented Apr 15, 2015

A possible workaround is to install ICU and not use --fetch icu.

@zaherg
Copy link

zaherg commented Apr 17, 2015

is there any specific things I can try ?

@AtnNn
Copy link
Member

AtnNn commented Apr 17, 2015

@linuxjuggler what Linux distribution are you running? Have you tried installing ICU and not using --fetch icu?

@zaherg
Copy link

zaherg commented Apr 17, 2015

Am on pi2 and using raspian

And nope i didnt tried to install it nor i know what is it to be honest

@u9520107
Copy link

test on arch linux on pi2, also fails on the same error.
I did install icu not use the fetched one.

@u9520107
Copy link

@danielmewes I appended -ldl like you said, and have a succesful build!
Running on arch-linux on raspberry pi2. With icu installed.

./configure --with-system-malloc --allow-fetch
make

However make install resulted in error. But the rethinkdb binary was working.

@danielmewes
Copy link
Member Author

@u9520107 Good to know. So at least in some cases that appears to be the solution then.

Do you still happen have the make install output somewhere?

@u9520107
Copy link

@danielmewes sorry for the late reply...
Error after sudo make install on rpi2 with arch linux

    [1/8] INSTALL build/release_system/rethinkdb /usr/local/bin
    [2/8] M4 build/release_system/assets/rethinkdb.1
/usr/bin/bash: m4: command not found
mk/install.mk:76: recipe for target 'build/release_system/assets/rethinkdb.1' failed
make[1]: *** [build/release_system/assets/rethinkdb.1] Error 127
make[1]: *** Deleting file 'build/release_system/assets/rethinkdb.1'
Makefile:52: recipe for target 'make' failed
make: *** [make] Error 2

The assets folder is indeed empty though. Maybe I should redo the build process in a fresh folder when I have some free time.

@danielmewes
Copy link
Member Author

@u9520107 thanks, that looks like m4 is simply not installed.

@grempe
Copy link

grempe commented Jun 10, 2015

I am having the same issue. Raspberry Pi 2 running Raspbian (Wheezy). Here is the output of the configure and make commands:

glenn@rp1 ~/rethinkdb-2.0.2 $ uname -a
Linux rp1 3.18.13-v7+ #785 SMP PREEMPT Mon May 18 17:53:02 BST 2015 armv7l GNU/Linux

First failure result was:

https://gist.github.com/grempe/d47f3a6d24ef9f9f7f0e

Then I added libicu-dev (trying to follow suggestion above):

sudo apt-get install libicu-dev

This resulted in a different failure. Here is the output:

https://gist.github.com/grempe/6aee26652424628fbdfc

@AtnNn
Copy link
Member

AtnNn commented Jun 10, 2015

@grempe that does look like the same issue.

Have you tried the patch suggested in #4064 (comment) ?

@grempe
Copy link

grempe commented Jun 11, 2015

OK, that worked.

I removed the whole tarfile directory, re-downloaded, and unpacked, and made the patch change suggested after which it made it to the final step of the make (after several hours). Keep in mind also that I had run this prior to install and I'm not sure now if this will be needed or not:

sudo apt-get install libicu-dev

Here is the full output.

https://gist.github.com/grempe/18450eed500025975811

However, this brought me to the next issue. The install fails:

glenn@rp1 ~/rethinkdb-2.0.2 $ sudo checkinstall make install

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs?  [y]:

Preparing package documentation...OK

Please write a description for the package.
End your description with an empty line or EOF.
>> rethinkdb-2.0.2
>>

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 -  Maintainer: [ root@rp1 ]
1 -  Summary: [ rethinkdb-2.0.2 ]
2 -  Name:    [ rethinkdb ]
3 -  Version: [ 2.0.2 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ armhf ]
8 -  Source location: [ rethinkdb-2.0.2 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ rethinkdb ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue:

Installing with make install...

========================= Installation results ===========================
    [1/13] CC build/release_system/obj/clustering/administration/main/command_line.o
    [2/13] CC build/release_system/obj/rdb_protocol/terms/string.o
    [3/13] CC build/release_system/obj/http/http.o
/tmp/ccoKUWjs.s: Assembler messages:
/tmp/ccoKUWjs.s:1876: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:1893: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:1931: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:2089: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:2116: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:2153: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:3111: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:3128: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:3164: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:4667: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:4684: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:4721: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:4887: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:4915: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:4952: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:19913: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:19931: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:21509: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:21525: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:40840: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:40857: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:40893: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:41165: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:41194: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:41230: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:41744: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:41772: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:42012: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
/tmp/ccoKUWjs.s:42040: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
    [4/13] CC build/release_system/obj/extproc/http_job.o
    [5/13] LD build/release_system/rethinkdb
    [6/13] INSTALL build/release_system/rethinkdb /usr/local/bin
    [7/13] M4 build/release_system/assets/rethinkdb.1
    [8/13] GZIP build/release_system/assets/rethinkdb.1.gz
    [9/13] INSTALL build/release_system/assets/rethinkdb.1.gz /usr/local/share/man/man1
    [10/13] INSTALL ./packaging/assets/docs/LICENSE /usr/local/share/doc/rethinkdb/copyright
install: cannot create directory `/usr/local/share/doc': No such file or directory
mk/install.mk:111: recipe for target 'install-docs' failed
make[1]: *** [install-docs] Error 1
Makefile:52: recipe for target 'make' failed
make: *** [make] Error 2

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

I had to run through this a few times. It seems the install script makes assumptions about the existence of certain directories (which don't exist on a Raspbian system by default). I'm assuming your installation script doesn't create missing directories on its own (or is this an artifact of running this make install through 'checkinstall' which wraps everything up in a deb package so I can more easily uninstall later?). I had to do:

sudo mkdir /usr/local/share/doc
sudo mkdir /usr/local/var
sudo mkdir /usr/local/var/lib
sudo mkdir /usr/local/var/lib/rethinkdb

After this the install succeeded and I was at least able to start rethinkdb in the foreground.

Hopefully these changes will be baked into the project and the Raspbian install instructions so others don't have to discover this thread to make it all work.

Thanks

@AtnNn
Copy link
Member

AtnNn commented Jun 11, 2015

A possible fix is in review 2980 assigned to @danielmewes

@danielmewes
Copy link
Member Author

Thanks for the writeup @grempe .

@AtnNn Sounds like we should include those mkdirs in the make install rules (assuming they're currently missing).

@AtnNn
Copy link
Member

AtnNn commented Jun 11, 2015

I've opened a separate issue for the missing directories: #4377

@AtnNn
Copy link
Member

AtnNn commented Jun 11, 2015

Fixed in 8e0d019

@AtnNn AtnNn closed this as completed Jun 11, 2015
@danielmewes danielmewes modified the milestones: 2.0.x, 2.0.4 Jun 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants