Giter VIP home page Giter VIP logo

strusbase's People

Contributors

andreasbaumann avatar patrickfrey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

strusbase's Issues

compilation flags are explicitely set, Release/Debug cmake switches ignored

applies to all strus packages.

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=lib .

Then I see:

cd strusUtilities_explicit_document_type/src/utils && /bin/c++
 -IstrusUtilities_explicit_document_type/include  -std=c++98
 -Wall -pedantic -g -Wfatal-errors -fvisibility=hidden -fPIC -O3 -pthread -O3 -DNDEBUG 
-o CMakeFiles/strusutilities_private_utils.dir/utils.cpp.o -c src/utils/utils.cpp

O3 is there twice, once with the STRUS_OPTIMIZATION_LEVEL and once because cmake
sets it when Release is given.

When using:

 cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DLIB_INSTALL_DIR=lib .

I see:

cd strusUtilities_explicit_document_type/src/utils && /bin/c++ 
 -IstrusUtilities_explicit_document_type/include
 -std=c++98  -Wall -pedantic -g -Wfatal-errors -fvisibility=hidden -fPIC -O3
-pthread -g   -o CMakeFiles/strusutilities_private_utils.dir/utils.cpp.
 -c strusUtilities_explicit_document_type/src/utils/utils.cpp

Debug and O3 are not good friends. ;-)

If I add my own compilation flags, they are simply ignored.

So STRUS_OPTIMIZATION_LEVEL should be removed

and

set( CMAKE_CXX_FLAGS "-std=c++98  -Wall -pedantic -g -Wfatal-error
-fvisibility=hidden -fPIC ...

should be changed to

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98  -Wall -pedantic
-g -Wfatal-errors -fvisibility=hidden -fPIC ...

See also http://voices.canonical.com/jussi.pakkanen/2013/03/26/a-list-of-common-cmake-antipatterns/, "Clobbering CMAKE_CXX_FLAGS".

rpath and ld.conf.d issues

ld.conf.d/strus.conf should only be in the lowest package "strusBase", currently it is in "strus".

readelf -d

shows that we have an RPATH to /usr/lib/strus

So, when building tests on a machine having strus libraries installed, those installed libraries
take precedence and not the once you are currently working on. This should be either
a RUNPATH or no RPATH/RUNPATH at all.

Also package maintainers don't like RPATHs in packages.

DEBUG_POSTFIX "_d"

I fail to see how this could possibly work, all references to the libraries to link to are specidfied without
"_d".

Besides it's better IMHO to do separate builds for Release and Debug outside the source tree in
dedicated build directories (out-of-source-builds).

This applies to all strus repositories.

OpenBSD shared libraries broken

We get:

src/error/libstrus_error.so -> libstrus_error.so.0.10
src/error/libstrus_error.so.0.10
src/error/libstrus_error.so.0.10.0

Where libstrus_error.so.0.10 gets a dependency on strusbase:

 0x00000001 (NEEDED)                     Shared library: [../base/libstrus_base.so.0.10]

And libstrus_error.so.0.10.0:

 0x00000001 (NEEDED)                     Shared library: [libstrus_base.so.0.10]

The first one is completely wrong.

This bug applies to all strus projects.

distclean doesn't clean up properly

As many files created by cmake are ignored in .gitignore, make distclean doesn't delete them.
(examples CMakeFiles directory, Makefile, cmake_install.cmake, etc.)

Applies to all strus projects.

cleanup of cmake files needed

Quite some things are superfluous and should be removed IMHO:

  • set( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON ), we use native packages, not cpack
  • probing of Linux distribution (if the build process starts to depend on the Linux distribution we
    are in real trouble)
  • ARGS -Rf pkg ${DISTCLEANED}, pkg is from cpack presumably

Applies to all strus projects.

linking on FreeBSD 11.0 fails

Linking CXX shared library libstrus_base.so
/usr/bin/ld: ../utils/libstrusbase_private_utils.a(utils.cpp.o): relocation R_X86_64_32 against `_ZNSt3__15ctypeIcE2idE' can not be used when making a shared object; recompile with -fPIC
../utils/libstrusbase_private_utils.a: could not read symbols: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
c++filt _ZNSt3__15ctypeIcE2idE

says:

std::__1::ctype<char>::id

Why should default symbols in the c libary be non-PIC I wonder?

make dist and dist/obs/deploy_to_obs.sh problems

A variety of issues:

  • make dist doesn't work in an out-of-source builds
  • dito deploy_to_obs.sh
  • deploy_to_obs.sh is very Linux-focused, doesn't work on non-Linux (arguments, md5sum, etc.)

This applies to all strus projects.

Wrong versioning scheme for shared libraries

The project version has nothing to do with the API/ABI version of a shared library, so
not the same variables should be used in:

set_target_properties(
    strus_error
    PROPERTIES
    DEBUG_POSTFIX "_d"
    SOVERSION "${STRUS_MAJOR_VERSION}.${STRUS_MINOR_VERSION}"
    VERSION ${STRUS_VERSION}
)

SONAME should be an increasing integer indicating whether the binary compatibility of
the library has been changed. VERSION is used to create the symlinks when installing
for loaders which are not smart enough.

This applies to all strus projects.

CI is manual and tedious

OpenSuseBuild service builds and Travis builds can be organized using Github hooks.
This would produce a new version of the master for Linux and OSX.
FreeBSD, OpenBSD would remain manual builds (there is no automatized build system I know
of, which would support those two platforms).

Travis has a cancel-build-feature: if a new master is built and the current builds are aborted
if there is a new check-in on Github.
OBS has this feature since ever.
So we don't have to worry to use too many resources on those build systems.

The current way of manually building OBS versions leads to tedious repetitive work or/and
non-current packages.

Also the Travis CI and OBS builds run on my personal accounts, which makes them most
likely invisible to users.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.