Giter Club home page Giter Club logo

skalibs's Introduction

skalibs - a general-purpose low-level C library
-----------------------------------------------

 skalibs is a C library used by all the skarnet.org packages.
It provides APIs more suited to secure and efficient system
programming than the libc, especially where network programming
and IPCs are concerned.

 See the enclosed doc/ subdirectory for the documentation, or
 https://skarnet.org/software/skalibs/


* Installation
  ------------

 See the INSTALL file.


* Contact information
  -------------------

 Laurent Bercot <ska-skaware at skarnet.org>

 Please use the <skaware at list.skarnet.org> mailing-list for
questions about skalibs.

skalibs's People

Contributors

7heo avatar capezotte avatar heliocat avatar jjk-jacky avatar jprjr avatar mobin-2008 avatar skarnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skalibs's Issues

Install instructions aren't working

Steps to reproduce:

  1. Spun up EC2 on AWS (OS = Amazon Linux, AMI = amzn2-ami-hvm-2.0.20230628.0-x86_64-gp2, size = t2.micro)
  2. SSH to machine
  3. Install git (sudo yum install git)
  4. Install C compiler (sudo yum install gcc)
  5. Clone git repo (git clone git://git.skarnet.org/skalibs)
  6. Change directory into /skalibs (cd skalibs)
  7. Run install instructions (./configure && make && sudo make install)

Getting error message "Makefile:12: *** Missing config.mak; please use ./configure first. Stop.".

Steps to troubleshoot: ran ./configure, then make (not as one conjoined command with "&&"). Still ran into same issue.

Please let me know what additional info I can provide.

Full output message:
Checking for C compiler... ... gcc Checking whether C compiler works... ... yes Checking target system type... ... x86_64-redhat-linux Checking whether compiler accepts -fPIC ... ... yes Checking whether compiler accepts -std=c99 ... ... yes Checking whether compiler accepts -fomit-frame-pointer ... ... yes Checking whether compiler accepts -fno-exceptions ... ... yes Checking whether compiler accepts -fno-unwind-tables ... ... yes Checking whether compiler accepts -fno-asynchronous-unwind-tables ... ... yes Checking whether compiler accepts -Werror=implicit-function-declaration ... ... yes Checking whether compiler accepts -Werror=implicit-int ... ... yes Checking whether compiler accepts -Werror=pointer-sign ... ... yes Checking whether compiler accepts -Werror=pointer-arith ... ... yes Checking whether compiler accepts -Wno-unused-value ... ... yes Checking whether compiler accepts -Wno-parentheses ... ... yes Checking whether compiler accepts -ffunction-sections ... ... yes Checking whether compiler accepts -fdata-sections ... ... yes Checking whether linker accepts -nostartfiles ... ... yes Checking whether linker accepts -Wl,--as-needed ... ... yes Checking whether linker accepts -Wl,--sort-section=alignment ... ... yes Checking whether linker accepts -Wl,--sort-common ... ... yes Checking whether linker accepts -Wl,--hash-style=both ... ... yes Checking required linker flags for socket functions... ... none Checking whether system has clock_gettime()... ... yes Checking whether system has CLOCK_MONOTONIC... ... yes Checking whether system has CLOCK_BOOTTIME... ... yes Checking whether system has posix_spawn()... ... yes Checking whether system has timer_create()... ... yes, with linker args: -lrt Checking endianness... ... little Checking size and signedness of standard types... ... done Checking whether system has accept4()... ... yes Checking whether system has MSG_CMSG_CLOEXEC... ... yes Checking whether system has dirfd()... ... yes Checking whether system has eventfd()... ... yes Checking whether system has flock()... ... yes Checking whether system has getpeereid()... ... no Checking whether system has SO_PEERCRED... ... yes Checking whether system has getpeerucred()... ... no Checking whether system has IPv6 support... ... yes Checking whether system has MSG_DONTWAIT... ... yes Checking whether system has O_DIRECTORY... ... yes Checking whether system has openat()... ... yes Checking whether system has linkat()... ... yes Checking whether system has memmem()... ... yes Checking whether system has pipe2()... ... yes Checking whether system has ppoll()... ... yes Checking whether system has revoke()... ... no Checking whether system has sendfile()... ... yes Checking whether system has setgroups()... ... yes Checking whether system has settimeofday()... ... yes Checking whether system has signalfd()... ... yes Checking whether system has splice()... ... yes Checking whether system has strcasestr()... ... yes Checking whether system has strnlen()... ... yes Checking whether system has uint64_t... ... yes Checking whether system has futimens()... ... yes Checking whether system has futimes()... ... yes Checking whether system has arc4random()... ... no Checking whether system has arc4random_addrandom()... ... no Checking whether system has setitimer()... ... yes Checking whether system has namespaces... ... yes Checking whether system has NS_GET_PARENT... ... yes Checking whether system has explicit_bzero()... ... yes Checking whether system has getrandom()... ... yes Checking whether system has GRND_INSECURE... ... no Checking whether system has chroot()... ... yes Checking whether system has /dev/urandom... ... yes Checking whether system has posix_spawn() returning early... ... no Creating config.mak... ... done. Creating src/include/skalibs/config.h... ... done. Makefile:12: *** Missing config.mak; please use ./configure first. Stop.

edge case when doing stralloc_readyplus

sa->len + n might wrap arround ( in case of user controlled n ). leaving the "buffer" in a state where len points past sa->s + sa->a because in stralloc_ready_tuned the condition sa->len < n is not verified/checked. or am i dreaming?

s390x: incompatible integer to pointer conversion passing 'uint16_t'

I try to cross build skalibs (2.12.0.1) on Alpine 3.17 against s390x arch and got the following error:

$ DESTDIR=/out ./configure '--host=s390x-alpine-linux-musl' --enable-slashpackage --enable-static-libc --disable-shared '--with-default-path=/command:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' '--with-sysdep-devurandom=yes'
...
...
#30 18.75 exec s390x-alpine-linux-musl-clang -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -Isrc/include -fPIC -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -Wno-unused-value -Wno-parentheses  -pipe -Wall -std=c99 -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -O2 -fomit-frame-pointer   -c -o src/libstddjb/uint16_pack.lo src/libstddjb/uint16_pack.c
#30 18.77 src/libstddjb/uint16_pack.c:10:18: error: incompatible integer to pointer conversion passing 'uint16_t' (aka 'unsigned short') to parameter of type 'uint16_t *' (aka 'unsigned short *'); take the address with & [-Wint-conversion]       
#30 18.77   uint16_littlep(u) ;
#30 18.77                  ^
#30 18.77                  &
#30 18.77 src/include/skalibs/uint16.h:12:41: note: expanded from macro 'uint16_littlep'
#30 18.77 #define uint16_littlep(u) uint16_bswapp(u)
#30 18.77                                         ^
#30 18.77 src/include/skalibs/uint16.h:22:38: note: passing argument to parameter here
#30 18.77 extern void uint16_bswapp (uint16_t *) ;
#30 18.77                                      ^
#30 18.77 1 error generated.
#30 18.77 make: *** [Makefile:123: src/libstddjb/uint16_pack.lo] Error 1

Only happens for s390x, other archs work just fine. Cannot repro on Alpine 3.16.

Install Instructions aren't working for me

Steps to reproduce:

Spun up EC2 on AWS (OS = Amazon Linux, AMI = amzn2-ami-hvm-2.0.20230628.0-x86_64-gp2, size = t2.micro)
SSH to machine
Install git (sudo yum install git)
Install C compiler (sudo yum install gcc)
Clone git repo (git clone git://git.skarnet.org/skalibs)
Change directory into /skalibs (cd skalibs)
Run install instructions (./configure && make && sudo make install)
Getting error message "Makefile:12: *** Missing config.mak; please use ./configure first. Stop.".

Steps to troubleshoot: ran ./configure, then make (not as one conjoined command with "&&"). Still ran into same issue.

Please let me know what additional info I can provide.

Full output message:
Checking for C compiler... ... gcc Checking whether C compiler works... ... yes Checking target system type... ... x86_64-redhat-linux Checking whether compiler accepts -fPIC ... ... yes Checking whether compiler accepts -std=c99 ... ... yes Checking whether compiler accepts -fomit-frame-pointer ... ... yes Checking whether compiler accepts -fno-exceptions ... ... yes Checking whether compiler accepts -fno-unwind-tables ... ... yes Checking whether compiler accepts -fno-asynchronous-unwind-tables ... ... yes Checking whether compiler accepts -Werror=implicit-function-declaration ... ... yes Checking whether compiler accepts -Werror=implicit-int ... ... yes Checking whether compiler accepts -Werror=pointer-sign ... ... yes Checking whether compiler accepts -Werror=pointer-arith ... ... yes Checking whether compiler accepts -Wno-unused-value ... ... yes Checking whether compiler accepts -Wno-parentheses ... ... yes Checking whether compiler accepts -ffunction-sections ... ... yes Checking whether compiler accepts -fdata-sections ... ... yes Checking whether linker accepts -nostartfiles ... ... yes Checking whether linker accepts -Wl,--as-needed ... ... yes Checking whether linker accepts -Wl,--sort-section=alignment ... ... yes Checking whether linker accepts -Wl,--sort-common ... ... yes Checking whether linker accepts -Wl,--hash-style=both ... ... yes Checking required linker flags for socket functions... ... none Checking whether system has clock_gettime()... ... yes Checking whether system has CLOCK_MONOTONIC... ... yes Checking whether system has CLOCK_BOOTTIME... ... yes Checking whether system has posix_spawn()... ... yes Checking whether system has timer_create()... ... yes, with linker args: -lrt Checking endianness... ... little Checking size and signedness of standard types... ... done Checking whether system has accept4()... ... yes Checking whether system has MSG_CMSG_CLOEXEC... ... yes Checking whether system has dirfd()... ... yes Checking whether system has eventfd()... ... yes Checking whether system has flock()... ... yes Checking whether system has getpeereid()... ... no Checking whether system has SO_PEERCRED... ... yes Checking whether system has getpeerucred()... ... no Checking whether system has IPv6 support... ... yes Checking whether system has MSG_DONTWAIT... ... yes Checking whether system has O_DIRECTORY... ... yes Checking whether system has openat()... ... yes Checking whether system has linkat()... ... yes Checking whether system has memmem()... ... yes Checking whether system has pipe2()... ... yes Checking whether system has ppoll()... ... yes Checking whether system has revoke()... ... no Checking whether system has sendfile()... ... yes Checking whether system has setgroups()... ... yes Checking whether system has settimeofday()... ... yes Checking whether system has signalfd()... ... yes Checking whether system has splice()... ... yes Checking whether system has strcasestr()... ... yes Checking whether system has strnlen()... ... yes Checking whether system has uint64_t... ... yes Checking whether system has futimens()... ... yes Checking whether system has futimes()... ... yes Checking whether system has arc4random()... ... no Checking whether system has arc4random_addrandom()... ... no Checking whether system has setitimer()... ... yes Checking whether system has namespaces... ... yes Checking whether system has NS_GET_PARENT... ... yes Checking whether system has explicit_bzero()... ... yes Checking whether system has getrandom()... ... yes Checking whether system has GRND_INSECURE... ... no Checking whether system has chroot()... ... yes Checking whether system has /dev/urandom... ... yes Checking whether system has posix_spawn() returning early... ... no Creating config.mak... ... done. Creating src/include/skalibs/config.h... ... done. Makefile:12: *** Missing config.mak; please use ./configure first. Stop.

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.