Code Monkey home page Code Monkey logo

yder's Introduction

What?

Main projects

Project Descripion License Last release
Glewlwyd Experimental Single Sign On server, OAuth2, Openid Connect, MFA GitHub GitHub release (latest by date)
Ulfius Web Framework in C GitHub GitHub release (latest by date)
Rhonabwy JWK, JWKS, JWS, JWE and JWT C library GitHub GitHub release (latest by date)
Iddawc OAuth2 and OIDC client library GitHub GitHub release (latest by date)
Hoel C Database abstraction library with json based language GitHub GitHub release (latest by date)
Taliesin Lightweight audio streaming server GitHub GitHub release (latest by date)
Angharad House automation system with a REST/Json interface GitHub GitHub release (latest by date)
Hutch Online password and secret locker GitHub GitHub release (latest by date)
Yder Logging library for C applications GitHub GitHub release (latest by date)
Orcania Potluck library GitHub GitHub release (latest by date)

Other projects

Project Descripion License
Taulas Arduino source files for Angharad system devices GitHub
Huddersfield Project packages builder and publisher GitHub

Why?

C combines the power and performance of assembly language with the flexibility and ease-of-use of assembly language.

Coding backend in C and front-end in HTML/Javascript is the true meaning of life.

Who?

Nicolas Mora

My GPG key: 8405 B02F CC28 EF97 44C8 F253 FE82 1394 40BD 22B9

avatar I don't look like that

Where?

Québec City, Canada

How?

(Debian || Ubuntu) && GNU && Geany

yder's People

Contributors

babelouest avatar claydowling avatar johnazoidberg avatar madebr avatar nageshlop avatar silvioprog avatar sunflsks avatar yogo1212 avatar

Stargazers

 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

yder's Issues

cmake building branch

Hello dudes!

I created a new branch called cmake with the CMake files to build yder by cmake:

git clone https://github.com/silvioprog/yder.git
cd yder/
git checkout cmake
mkdir build
cd build/
cmake ..
make

It will download all yder dependencies and generated its shared and static libraries. Now, to install them:

sudo make install

or, if you prefer striped version:

sudo make install/strip

It was tested on Xubuntu and worked fine, so I'm going to try it on MinGW-w64 yet.

1.4.19: Orcania not found

1.4.18 buids fine but 1.4.19 can't find Orcania. I'm comparing CMakeLists.txt from both versions but I can't find problem:

(FreeBSD 13.2 amd64)

===>   yder-1.4.19 depends on package: orcania>=2.3.0 - found
===>   yder-1.4.19 depends on file: /usr/local/bin/cmake - found
===>   yder-1.4.19 depends on executable: ninja - found
===>   yder-1.4.19 depends on shared library: libjansson.so - found (/usr/local/lib/libjansson.so)
===>   yder-1.4.19 depends on shared library: liborcania.so - found (/usr/local/lib/liborcania.so)
===>  Configuring for yder-1.4.19
===>  Performing out-of-source build
/bin/mkdir -p /wrkdirs/usr/ports/devel/yder/work/.build
-- The C compiler identification is Clang 14.0.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for __GNU_LIBRARY__
-- Looking for __GNU_LIBRARY__ - not found
-- Looking for _GNU_SOURCE
-- Looking for _GNU_SOURCE - not found
CMake Error at CMakeLists.txt:198 (message):
  Orcania not found


-- Configuring incomplete, errors occurred!
*** Error code 1

Doxygen docs

Hello dudes!

What do you thing about adopting some documentation tool like Doxygen? :-)

Some advantages:

So, instead of:

/**
 * Log a message using current parameters
 */
Y_EXTERN void y_log_message(unsigned long type, const char * message, ...);

we could do:

/**
 * Log a message using current parameters.
 * @param type Message relevance type.
 * @param message Message string.
 */
Y_EXTERN void y_log_message(unsigned long type, const char * message, ...);

Tests run only one test

There is only one test file but it contains multiple tests. It looks like cmake takes those and splits them up into individual tests. When I run the tests however, I get this output:

    Start 1: yder_test                                     
1/1 Test #1: yder_test ........................   Passed    0.01 sec                          
                                                                                                                       
100% tests passed, 0 tests failed out of 1                                                                             
                                                                                                                       
Total Test time (real) =   0.01 sec                                                                                    

Is that how it is supposed to look?

Making yder thread-safe

As mentioned in babelouest/glewlwyd#103 , yder may lead to deadlocks in some cases due to its non thread-safetyness.

I see 2 improvements here:

  • Using a mutex in y_log_message to avoid 2 threads writing logs at the same time
  • Using a static char[] variable of a fixed size (let's say 256 but this could be modified during y_init_logs), if the log message size is lower than the static char[] size then use the static char[], otherwise use o_malloc

Creating Debian Package

Hi,

I'm trying to create a yder Debian Package on my Dev Machine (x86) for an ARM based SBC (cross compiling).

The cmake module FindOrcania.cmake automatically downloads orcania and the libyder package is created without any issues.
However, the orcania files are also getting included in the libyder debian package.

install_manifest.txt

/usr/lib/pkgconfig/libyder.pc
/usr/lib/libyder.so.1.4.11
/usr/lib/libyder.so.1.4
/usr/lib/libyder.so
/usr/include/yder.h
/usr/include/yder-cfg.h
/usr/share/doc/yder/examples//Makefile
/usr/share/doc/yder/examples//log_file.c
/usr/share/doc/yder/examples//log_combined.c
/usr/share/doc/yder/examples//log_syslog.c
/usr/share/doc/yder/examples//log_journald.c
/usr/share/doc/yder/examples//log_callback.c
/usr/share/doc/yder/examples//log_console.c
/usr/share/doc/yder/README.md
/usr/lib/pkgconfig/liborcania.pc
/usr/lib/liborcania.so.2.1.1
/usr/lib/liborcania.so.2.1
/usr/lib/liborcania.so
/usr/include/orcania.h
/usr/include/orcania-cfg.h

When I'm installing the package on my target system, I get an error since orcania-cfg.h etc are already installed by the liborcania package.

Is there a way to exclude the orcania files from the yder package? I have the same problem with the ulfius lib.

Memory leak

Valgrind reports lost memory of my program that uses yder:

13 bytes in 1 blocks are definitely lost in loss record 2 of 9
   at 0x4C28C20: malloc (vg_replace_malloc.c:296)
   by 0x58176C9: o_strndup (in /cryptops-api/libraries/liborcania.so)
   by 0x5615024: y_write_log (in /cryptops-api/libraries/libyder.so)
   by 0x405305: main (cryptops-api.c:24)

could this be a memory leak in yder, or is it a usage error?

undefined reference to "function" in cross compile

Hello @babelouest.
I want to build Rhonabwy for armhf.
I were compile Orcania, Yder and Rhonabwy with the parameter cmake:

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(tools /usr)
set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc-8)
set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++-8)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

no error while compiling.
I test packages by calling executable functions in the library.
and I got "undefined reference to 'function'" for function of Rhonabwy and Yder but Orcania not (Orcania is working).
where did I go wrong? can you suggest me?

Registering a custom log handler / integration with other backends

I'm currently experimenting to use libulfius in an application (upcoming USSD gateway part of osmocom.org). I saw that ulfius uses yder as log backend. It's great that yder can log to console, syslog and the like. However, quite a number of more complex programs / frameworks come with their own logging infrastructure. Normally, one would want to register some kind of call-back function with yder to feed yder log messages into that logging framework. This way, all parts of a program (including its REST interface) log via one common framework.

fatal error: 'features.h' file not found

EDIT: I think I've figure this out. I have only some dependencies upgraded.

Yes, confirmed. orcania >= 2.3.0 fixes this.

Which features.h does it want? I think it's not one of these:

root@123amd64-dvl-testing:~ # find / -name features.h
/usr/src/sys/xen/features.h
/usr/src/sys/xen/interface/features.h

This is the full output of the errors.

root@123amd64-dvl-testing:~ # less /wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeError.log
Determining if the __GNU_LIBRARY__ exist failed with the following output:
Change Dir: /wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_7a015 && [1/2] Building C object CMakeFiles/cmTC_7a015.dir/CheckSymbolExists.c.o
FAILED: CMakeFiles/cmTC_7a015.dir/CheckSymbolExists.c.o 
/usr/bin/cc   -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -Wall -MD -MT CMakeFiles/cmTC_7a015.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_7a015.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_7a015.dir/CheckSymbolExists.c.o -c /wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'features.h' file not found
#include <features.h>
         ^~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.


File /wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <features.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef __GNU_LIBRARY__
  return ((int*)(&__GNU_LIBRARY__))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the _GNU_SOURCE exist failed with the following output:
Change Dir: /wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_a06d4 && [1/2] Building C object CMakeFiles/cmTC_a06d4.dir/CheckSymbolExists.c.o
FAILED: CMakeFiles/cmTC_a06d4.dir/CheckSymbolExists.c.o 
/usr/bin/cc   -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -Wall -MD -MT CMakeFiles/cmTC_a06d4.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_a06d4.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_a06d4.dir/CheckSymbolExists.c.o -c /wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'features.h' file not found
#include <features.h>
         ^~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.


File /wrkdirs/usr/ports/devel/yder/work/.build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <features.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef _GNU_SOURCE
  return ((int*)(&_GNU_SOURCE))[argc];
#else
  (void)argc;
  return 0;
#endif
}
root@123amd64-dvl-testing:~ # 

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.