Re: [ipv6calc] ipv6calc OSX
1.) regarding -install_name vs. -soname
example: https://code.google.com/p/lz4/source/browse/trunk/Makefile#60
2.) install PREFIX:
Without a prefix, it will install the man from the root in the root directory (/) of the drive. We use user-space (/usr/local)
2014-08-16 19:00 GMT+03:00 Peter Bieringer pb@bieringer.de:
Hi Denis,
- regarding -install_name vs. -soname
this requires conditional compiling (depending whether Linux or OSX), therefore this should be handled by configure somehow.
Can you please check how OSX can be detected by configure?
- install PREFIX:
currently, no PREFIX is used at all on other "install" calls, I'm wondering that only man pages are requiring PREFIX on "install" on OSX - can you doublecheck?
Regards, Peter
Am 16.08.2014 17:04, schrieb Denis Denisov:
I am having a problem when compiling on OSX, some problems have been resolved.
[bug 1]
"-Wl,-soname,libipv6calc_db_wrapper.so" renamed to "-Wl,-install_name,libipv6calc_db_wrapper.so"
[bug 2]
crash linked llvm ( clang )
echo "Create shared library (.so)" Create shared library (.so) clang -o libipv6calc_db_wrapper.so.0.97.4 libipv6calc_db_wrapper.o libipv6calc_db_wrapper_GeoIP.o libipv6calc_db_wrapper_IP2Location.o libipv6calc_db_wrapper_BuiltIn.o -D__EXTENSIONS__ -fPIC -shared -Wl,-install_name,libipv6calc_db_wrapper.so.0.97.4 Undefined symbols for architecture x86_64: "_ipv4addr_getdword", referenced from: _libipv6calc_db_wrapper_BuiltIn_reserved_string_by_ipv4addr in libipv6calc_db_wrapper_BuiltIn.o _libipv6calc_db_wrapper_BuiltIn_registry_num_by_ipv4addr in libipv6calc_db_wrapper_BuiltIn.o "_ipv6addr_getdword", referenced from: ..... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [libipv6calc_db_wrapper.so.0.97.4] Error 1 make[1]: *** [all] Error 2 make: *** [db-wrapper-make] Error 2
[patch]
--- a/man/Makefile.in +++ b/man/Makefile.in @@ -25,7 +25,7 @@ clean: test:
install:
mkdir -p $(DESTDIR)$(mandir)/man8
mkdir -p $(DESTDIR)${PREFIX}/man/man8 for f in *.8; do \
install -m 644 $$f $(DESTDIR)$(mandir)/man8; \
install -m 644 $$f $(DESTDIR)${PREFIX}/man/man8; \ done
--- a/databases/lib/Makefile.in +++ b/databases/lib/Makefile.in @@ -54,7 +54,7 @@ libipv6calc_db_wrapper.a: $(OBJS)
libipv6calc_db_wrapper.so.@PACKAGE_VERSION@: $(OBJS) echo "Create shared library (.so)"
$(CC) -o libipv6calc_db_wrapper.so.@PACKAGE_VERSION@
$(OBJS) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,libipv6calc_db_wrapper.so.@PACKAGE_VERSION@
$(CC) -o libipv6calc_db_wrapper.so.@PACKAGE_VERSION@
$(OBJS) $(CFLAGS) $(LDFLAGS) -shared -Wl,-install_name,libipv6calc_db_wrapper.so.@PACKAGE_VERSION@
distclean: ${MAKE} clean --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -81,7 +81,7 @@ libipv6calc.so.@PACKAGE_VERSION@: $(OBJS) cd ../ && ${MAKE} db-ipv4-assignment-make cd ../ && ${MAKE} db-ipv6-assignment-make echo "Creates shared library (.so)"
$(CC) -o libipv6calc.so.@PACKAGE_VERSION@ $(OBJS)
$(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,libipv6calc.so.@PACKAGE_VERSION@
$(CC) -o libipv6calc.so.@PACKAGE_VERSION@ $(OBJS)
$(CFLAGS) $(LDFLAGS) -shared -Wl,-install_name,libipv6calc.so.@PACKAGE_VERSION@
distclean: ${MAKE} clean _______________________________________________ ipv6calc mailing list ipv6calc@lists.deepspace6.net https://lists.deepspace6.net/listinfo/ipv6calc ipv6calc homepage: http://www.deepspace6.net/projects/ipv6calc.html ipv6calc cvs: http://cvs.deepspace6.net/view/ipv6calc/
Hi Denis,
Am 31.08.2014 22:37, schrieb Denis Denisov:
1.) regarding -install_name vs. -soname
example: https://code.google.com/p/lz4/source/browse/trunk/Makefile#60
thank you, can you please check latest code from CVS.
2.) install PREFIX:
Without a prefix, it will install the man from the root in the root directory (/) of the drive. We use user-space (/usr/local)
This is still unclear to me. Can you check your build environment, perhaps DATAROOTDIR isn't proper set:
$ ./configure -h |egrep '(bin|man)dir' --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --mandir=DIR man documentation [DATAROOTDIR/man]
$ ./configure -h |egrep -i 'DATAROOTDIR' --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/ipv6calc]
Because
man/Makefile.in datarootdir = @datarootdir@ mandir = @mandir@
man/Makefile datarootdir = ${prefix}/share mandir = /usr/share/man
ipv6calc/Makefile.in bindir = @bindir@
ipv6calc/Makefile bindir = /usr/bin
Here on my system:
$ egrep '(datarootdir|mandir)' config.log Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140624/obj-i686-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140624/obj-i686-redhat-linux/cloog-install --with-tune=generic --with-arch=i686 --build=i686-redhat-linux datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' localedir='${datarootdir}/locale' mandir='${datarootdir}/man'
some automagic on Fedora?
--prefix=/usr will result in proper datarootdir and this in proper mandir
Hope this helps, Peter
participants (2)
-
Denis Denisov
-
Peter Bieringer