[syslog-ng] Getting error : .../libsyslog-ng.so: file not recognized: File truncated
Nitish Saboo
nitish.saboo55 at gmail.com
Wed Feb 5 11:57:09 UTC 2020
Hi,
I compiled the syslog-ng-3.7.1.tar.gz on a Ubuntu 16.04 machine .The
syslog-ng got compiled successfully on this machine.
----------------------------------------------------------------------
Libraries have been installed in:
/home/anassa/nitish/syslog-ng-3.7.1/install/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
--------------------------------------------------------------------Libraries
have been installed in:
/home/anassa/nitish/syslog-ng-3.7.1/install/lib/syslog-ng
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
-Ubuntu:~/nitish/syslog-ng-3.7.1/install/lib$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My project got compiled in 'syslog-ng-3.7.1' folder on machine Ubuntu 16.04.
I have a different machine with Ubuntu 14.04.I copied 'syslog-ng-3.7.1'
folder on this machine (Ubuntu 14.04). In this machine I tried compiling my
CGO project (Go and C) where my Go code is calling the C wrapper code that
internally call syslog-ng api's.
I have defined all the CFLAGS and LDFLAGS in my Go code for the run-timne
dependencies. At the time of compilation it is failing with the following
error:
Error
=====
lib/../deps/syslog/syslog-ng-3.7.1/install/lib/libsyslog-ng.so: file not
recognized: File truncated
[11:36:44][shellscript] collect2: error: ld returned 1 exit status
[11:36:44][shellscript] make: *** [main] Error 2
The file 'libsyslog-ng.so' is present at the location
'lib/../deps/syslog/syslog-ng-3.7.1/install/lib/':
total 3152
drwxrwxr-x 2 anassa anassa 4096 Feb 5 16:47 pkgconfig
-rwxr-xr-x 1 anassa anassa 3208176 Feb 5 16:47 libsyslog-ng-3.7.so.0.0.0
lrwxrwxrwx 1 anassa anassa 25 Feb 5 16:47 libsyslog-ng.so ->
libsyslog-ng-3.7.so.0.0.0
-rwxr-xr-x 1 anassa anassa 1155 Feb 5 16:47 libsyslog-ng.la
lrwxrwxrwx 1 anassa anassa 25 Feb 5 16:47 libsyslog-ng-3.7.so.0 ->
libsyslog-ng-3.7.so.0.0.0
drwxrwxr-x 3 anassa anassa 4096 Feb 5 16:47 python2.7
drwxrwxr-x 3 anassa anassa 4096 Feb 5 16:47 syslog-ng
Can someone please guide me what could be the possible reasons to get this
error ? What am I missing here ?
Thanks,
Nitish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20200205/f551ba93/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMG-20200116-WA0005.jpg
Type: image/jpeg
Size: 107205 bytes
Desc: not available
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20200205/f551ba93/attachment-0001.jpg>
More information about the syslog-ng
mailing list