Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ulfius.c does not compile #21

Closed
mrtndwrd opened this issue Jun 5, 2017 · 2 comments
Closed

ulfius.c does not compile #21

mrtndwrd opened this issue Jun 5, 2017 · 2 comments
Labels

Comments

@mrtndwrd
Copy link

mrtndwrd commented Jun 5, 2017

I've followed the installation instructions, but at the last step, the compilation of ulfius.c fails:

vagrant@jessie:/ulfius$ make
cd ./src && make   
make[1]: Entering directory '/ulfius/src'
gcc -c -fPIC -Wall -D_REENTRANT -I/usr/local/include -I../lib/orcania/src -I../lib/yder/src -O3    ulfius.c
ulfius.c: In function ‘ulfius_init_instance’:
ulfius.c:1155:65: error: dereferencing pointer to incomplete type
     ((struct _websocket_handler *)u_instance->websocket_handler)->pthread_init = 1;
                                                                 ^
Makefile:50: recipe for target 'ulfius.o' failed
make[1]: *** [ulfius.o] Error 1
make[1]: Leaving directory '/ulfius/src'
Makefile:53: recipe for target 'libulfius.so' failed
make: *** [libulfius.so] Error 2


I can compile when I checkout the 2.0.1 tag, so it seems to be a problem in the current master branch. I'm running on Debian Jessie, with

$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 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.

Please let me know if you need more information! For reproducibility, you can use the provided Vagrantfile. For the full log of what I did after git submodule update --init:

vagrant@jessie:/ulfius$ cd lib/orcania/
vagrant@jessie:/ulfius/lib/orcania$ make
cd ./src && make
make[1]: Entering directory '/ulfius/lib/orcania/src'
gcc -c -fPIC -Wall -D_REENTRANT -O3  orcania.c
gcc -shared -Wl,-soname,liborcania.so -o liborcania.so.1.1 orcania.o memory.o base64.o -lc -ljansson
ln -sf liborcania.so.1.1 liborcania.so
make[1]: Leaving directory '/ulfius/lib/orcania/src'
vagrant@jessie:/ulfius/lib/orcania$ sudo make install
cd ./src && make install
make[1]: Entering directory '/ulfius/lib/orcania/src'
cp liborcania.so.1.1 /usr/local/lib
cp orcania.h /usr/local/include
/sbin/ldconfig
make[1]: Leaving directory '/ulfius/lib/orcania/src'
vagrant@jessie:/ulfius/lib/orcania$ cd ../yder/
vagrant@jessie:/ulfius/lib/yder$ make
cd ./src && make
make[1]: Entering directory '/ulfius/lib/yder/src'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/ulfius/lib/yder/src'
vagrant@jessie:/ulfius/lib/yder$ sudo make install
cd ./src && make install
make[1]: Entering directory '/ulfius/lib/yder/src'
cp libyder.so.2.0 /usr/local/lib
cp yder.h /usr/local/include
/sbin/ldconfig
make[1]: Leaving directory '/ulfius/lib/yder/src'
vagrant@jessie:/ulfius/lib/yder$ cd ../../
vagrant@jessie:/ulfius$ make
cd ./src && make   
make[1]: Entering directory '/ulfius/src'
gcc -c -fPIC -Wall -D_REENTRANT -I/usr/local/include -I../lib/orcania/src -I../lib/yder/src -O3    ulfius.c
ulfius.c: In function ‘ulfius_init_instance’:
ulfius.c:1155:65: error: dereferencing pointer to incomplete type
     ((struct _websocket_handler *)u_instance->websocket_handler)->pthread_init = 1;
                                                                 ^
Makefile:50: recipe for target 'ulfius.o' failed
make[1]: *** [ulfius.o] Error 1
make[1]: Leaving directory '/ulfius/src'
Makefile:53: recipe for target 'libulfius.so' failed
make: *** [libulfius.so] Error 2

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.box = "debian/jessie64"
  config.vm.synced_folder ".", "/ulfius", type: 'virtualbox'
  config.vm.provision "shell", inline: <<-SHELL
    apt-get update
    apt-get install -y libmicrohttpd-dev libjansson-dev libcurl4-gnutls-dev libgnutls28-dev libgcrypt20-dev
  SHELL
end
@babelouest babelouest reopened this Jun 5, 2017
@babelouest
Copy link
Owner

Hi, thanks for the report, indeed there was a small bug introduced by recent changes. This should be fixed now in the last release, can you try again?

@babelouest babelouest added the bug label Jun 5, 2017
@mrtndwrd
Copy link
Author

mrtndwrd commented Jun 5, 2017

Indeed, newest version compiles without trouble! Thanks for the superfast reply!

@mrtndwrd mrtndwrd closed this as completed Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants