Discussion:
[Synce-devel] undefined reference in pcommon.c
Iain Buchanan
2006-12-17 23:50:00 UTC
Permalink
Hi all,

I'm trying to figure out an error compiling librapi... I have the
correct version of automake and autoconf, and I can run ./configure
correctly. (libsynce also compiles and installs ok).

Any help would be greatly appreciated. This seems to compile fine for
most people, but I've found one other user who has the same trouble.

I'm following the wiki, and I checked out from svn version 2716. This
is the output from `make` in librapi2:

...
/bin/sh ../libtool --tag=CC --mode=link gcc -I/usr/local/include
-Wall -Wsign-compare -Wno-long-long -o pcp pcommon.o
pcp.o ../src/librapi.la
mkdir .libs
gcc -I/usr/local/include -Wall -Wsign-compare -Wno-long-long
-o .libs/pcp pcommon.o pcp.o ../src/.libs/librapi.so
pcommon.o: In function `adjust_remote_path':
pcommon.c:(.text+0xd3): undefined reference to `wstr_append'
pcommon.c:(.text+0xf0): undefined reference to `wstr_append'
pcommon.c:(.text+0x101): undefined reference to `wstr_free_string'
pcommon.c:(.text+0x12f): undefined reference to `_synce_log_wstr'
pcommon.c:(.text+0x13d): undefined reference to `wstrdup'
pcommon.o: In function `anyfile_remote_open':
pcommon.c:(.text+0x2bd): undefined reference to `wstr_from_current'
pcommon.c:(.text+0x385): undefined reference to `synce_strerror'
pcommon.c:(.text+0x3b4): undefined reference to `_synce_log'
pcommon.c:(.text+0x3f1): undefined reference to `wstr_free_string'
pcp.o: In function `handle_parameters':
pcp.c:(.text+0xa6): undefined reference to `synce_log_set_level'
pcp.o: In function `main':
pcp.c:(.text+0x4a3): undefined reference to `synce_strerror'
pcp.c:(.text+0x61a): undefined reference to `wstrlen'
pcp.c:(.text+0x64e): undefined reference to `wstr_to_current'
pcp.c:(.text+0x6af): undefined reference to `wstr_free_string'
../src/.libs/librapi.so: undefined reference to `synce_socket_close'
../src/.libs/librapi.so: undefined reference to `synce_password_send'
../src/.libs/librapi.so: undefined reference to `synce_socket_free'
../src/.libs/librapi.so: undefined reference to `synce_info_new'
../src/.libs/librapi.so: undefined reference to
`synce_socket_get_descriptor'
../src/.libs/librapi.so: undefined reference to `synce_socket_write'
../src/.libs/librapi.so: undefined reference to
`synce_socket_connect_proxy'
../src/.libs/librapi.so: undefined reference to
`synce_socket_take_descriptor'
../src/.libs/librapi.so: undefined reference to
`synce_password_recv_reply'
../src/.libs/librapi.so: undefined reference to `synce_socket_connect'
../src/.libs/librapi.so: undefined reference to `synce_info_destroy'
../src/.libs/librapi.so: undefined reference to `synce_socket_read'
../src/.libs/librapi.so: undefined reference to
`filetime_from_unix_time'
../src/.libs/librapi.so: undefined reference to `synce_socket_new'
../src/.libs/librapi.so: undefined reference to `synce_socket_wait'
collect2: ld returned 1 exit status
make[3]: *** [pcp] Error 1
make[3]: Leaving directory `/usr/src/wm5/librapi2/tools'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/wm5/librapi2/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/wm5/librapi2'
make: *** [all] Error 2


Many thanks for any tips you can give me!
--
Iain Buchanan <iaindb at netspace dot net dot au>

[Sir Stafford Cripps] has all the virtues I dislike and none of the
vices I admire.
-- Winston Churchill
Iain Buchanan
2006-12-19 03:57:03 UTC
Permalink
Post by Iain Buchanan
Hi all,
I'm trying to figure out an error compiling librapi... I have the
correct version of automake and autoconf, and I can run ./configure
correctly. (libsynce also compiles and installs ok).
OK I managed to solve it by compiling librapi2 like this:

cd librapi2/
./bootstrap
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
./configure
make LIBS=/usr/local/lib/libsynce.so
sudo make install


note the "make LIBS=..."

To me, this doesn't seem like the "right way". Can someone comment on
why I had to do this, and what should be the "right way"?!

thanks heaps,
--
Iain Buchanan <iaindb at netspace dot net dot au>

Promptness is its own reward, if one lives by the clock instead of the sword.
Pedro Alves
2006-12-19 10:28:35 UTC
Permalink
Post by Iain Buchanan
Post by Iain Buchanan
Hi all,
I'm trying to figure out an error compiling librapi... I have the
correct version of automake and autoconf, and I can run ./configure
correctly. (libsynce also compiles and installs ok).
cd librapi2/
./bootstrap
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
./configure
make LIBS=/usr/local/lib/libsynce.so
sudo make install
note the "make LIBS=..."
To me, this doesn't seem like the "right way". Can someone comment on
why I had to do this, and what should be the "right way"?!
thanks heaps,
Could it be the same I saw here? :
http://www.mail-archive.com/synce-***@lists.sourceforge.net/msg00339.html
http://permalink.gmane.org/gmane.comp.handhelds.ipaq.synce.devel/345

It was never applied to trunk, so perhaps you could try the patch?
Perhaps you need only the autoconf/automake hunks. Don't forget to
regenerate the configure/Makefile.in and friends. If I remember
correctly there is an bootstrap.sh or autogen.sh or whatever that
does it for you, but it has been a while since I last built synce.

Cheers,
Pedro Alves
Iain Buchanan
2006-12-20 00:23:38 UTC
Permalink
Post by Pedro Alves
Post by Iain Buchanan
cd librapi2/
./bootstrap
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
./configure
make LIBS=/usr/local/lib/libsynce.so
sudo make install
http://permalink.gmane.org/gmane.comp.handhelds.ipaq.synce.devel/345
It was never applied to trunk, so perhaps you could try the patch?
Perhaps you need only the autoconf/automake hunks. Don't forget to
regenerate the configure/Makefile.in and friends. If I remember
correctly there is an bootstrap.sh or autogen.sh or whatever that
does it for you, but it has been a while since I last built synce.
I've been playing around with that patch... most of it would apply (even
when I tried to hack it a bit) so I just tried the Makefile and
configure hunks. The Makefile.am hunk was already applied in svn
version 2716. The configure.ac.in hunk applied, but didn't fix the
problem...

Anymore ideas? thanks,
--
Iain Buchanan <iaindb at netspace dot net dot au>

Decorate your home. It gives the illusion that your life is more
interesting than it really is.
-- C. Schulz
Loading...