-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Just wanted to report what changes I needed to do on Ubuntu 20.04, beyond the given instructions;
$ git log --oneline -1
ee6ce60 (HEAD -> master, origin/master, origin/HEAD) Sync plumber code
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: dependencies/plumber (modified content)
modified: init
no changes added to commit (use "git add" and/or "git commit -a")
diff of init script - disabling javascript, because plumberserver.com does not exist any more:
diff --git a/init b/init
index 2c5b03c..d4ce446 100755
--- a/init
+++ b/init
@@ -77,7 +77,7 @@ shell=zsh
case ${OS_NAME} in
Linux )
- javascript="yes"
+ javascript="no"
js_prebuilt="http://plumberserver.com/downloads/plumberv8-prebuild.6.3.0.x64.release.tar.gz"
;;
Darwin)
@@ -259,6 +259,8 @@ then
export LIBS=${LIBS}
export CFLAGS=${CFLAGS}
echo "-DCMAKE_INSTALL_PREFIX=${INSTALLDIR}
+-G \"Unix Makefiles\"
+-DPYTHON_PREFIX=python2
${cmake_param}
${JS_PARAM}
${SOURCEDIR}/plumber" | xargs cmake in dependencies/plumber:
$ git status
HEAD detached at 30fead1
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: build/compiler/shared.cmake
no changes added to commit (use "git add" and/or "git commit -a")
diff of build/compiler/shared.cmake (that is, ./dependencies/plumber/build/compiler/shared.cmake) - remove Werror as the break builds nowadays:
diff --git a/build/compiler/shared.cmake b/build/compiler/shared.cmake
index 0a7c366..ed297b8 100644
--- a/build/compiler/shared.cmake
+++ b/build/compiler/shared.cmake
@@ -1,2 +1,4 @@
-set(SHARED_CFLAGS "-g -Wpointer-arith -Wformat=2 -Wconversion -Wextra -Wall -Werror -Wshadow -Wcast-qual -Wmissing-prototypes -Wbad-function-cast -Wstrict-prototypes")
-set(SHARED_CXXFLAGS "-g -Wpointer-arith -Wformat=2 -Wconversion -Wextra -Wall -Werror -Wshadow -Wcast-qual")
+#set(SHARED_CFLAGS "-g -Wpointer-arith -Wformat=2 -Wconversion -Wextra -Wall -Werror -Wshadow -Wcast-qual -Wmissing-prototypes -Wbad-function-cast -Wstrict-prototypes")
+#set(SHARED_CXXFLAGS "-g -Wpointer-arith -Wformat=2 -Wconversion -Wextra -Wall -Werror -Wshadow -Wcast-qual")
+set(SHARED_CFLAGS "-g -Wpointer-arith -Wformat=2 -Wconversion -Wextra -Wall -Wshadow -Wcast-qual -Wmissing-prototypes -Wbad-function-cast -Wstrict-prototypes")
+set(SHARED_CXXFLAGS "-g -Wpointer-arith -Wformat=2 -Wconversion -Wextra -Wall -Wshadow -Wcast-qual")Also beyond the given:
sudo apt install cmake gcc g++ uuid-dev libssl-dev pkg-config python2.7 libpython2.7-dev libreadline-dev zsh
... I had to do:
sudo apt install python2 python2-dev zlib1g-dev
And, then I could run:
$ ./init
~/src/plumber_examples_git/build/plumber ~/src/plumber_examples_git
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/gcc
...
Operation sucessfully posted
Compiling type description file /home/administrator/src/plumber_examples_git/dependencies/plumber/servlets/rest/controller/protocol/command.ptype
Validating....
Types to update:
[0] plumber/std_servlet/rest/controller/v0/Command
[1] plumber/std_servlet/rest/controller/v0/OpCodes
[2] plumber/std_servlet/rest/controller/v0/UUID
Operation sucessfully posted
You are enetring Isolated Plumber Envrionment
To check if you are in the Plumber Isolated Environment, use command whereami
To quit the environment, please exit current shell
Plumber Version 0.1.1.30fead1.dirty 2023-04-10T12:24:26 Linux
Plumber Service Script Interpreter pscript at /home/user/src/plumber_examples_git/installed/bin/pscript
Plumber Servlet Testbed pstest at /home/user/src/plumber_examples_git/installed/bin/pstest
Protocol Management Tool protoman at /home/user/src/plumber_examples_git/installed/bin/protoman
mypc% whereami
You are under Plumber Isolated Environment at /home/user/src/plumber_examples_git, to leave the environment, please exit current shell.
mypc% (ctrl-D)
$
Here is how to run an example: change to a subdirectory, and do make run - at first it fails:
mypc% cd src/extractor_example
mypc% make run
cd readsock && make -f /home/user/src/plumber_examples_git/installed/lib/plumber/servlet.mk LINKER="gcc" OUTPUT="../bin" LDFLAGS=" -L/home/user/src/plumber_examples_git/installed/lib -lpstd -lproto" CFLAGS="-g -I/home/user/src/plumber_examples_git/installed/include/pstd -I/home/user/src/plumber_examples_git/installed/include/proto"
make[1]: Entering directory '/home/user/src/plumber_examples_git/src/extractor_example/readsock'
cc -c -fPIC -I/home/user/src/plumber_examples_git/installed/include/pservlet -o readsock.o readsock.c -g -I/home/user/src/plumber_examples_git/installed/include/pstd -I/home/user/src/plumber_examples_git/installed/include/proto
gcc -fPIC -shared -Wl,-soname,libreadsock.so -o ../bin/libreadsock.so readsock.o -L/home/user/src/plumber_examples_git/installed/lib -lpstd -lproto -L/home/user/src/plumber_examples_git/installed/lib -lpservlet
/usr/bin/ld: cannot open output file ../bin/libreadsock.so: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [/home/user/src/plumber_examples_git/installed/lib/plumber/servlet.mk:30: libreadsock.so] Error 1
make[1]: Leaving directory '/home/user/src/plumber_examples_git/src/extractor_example/readsock'
make: *** [../../shared.mk:13: bin/libreadsock.so] Error 2
Apparently, there is a bin directory missing so let's create it:
mypc% mkdir bin
mypc% make run
cd readsock && make -f /home/user/src/plumber_examples_git/installed/lib/plumber/servlet.mk LINKER="gcc" OUTPUT="../bin" LDFLAGS=" -L/home/user/src/plumber_examples_git/installed/lib -lpstd -lproto" CFLAGS="-g -I/home/user/src/plumber_examples_git/installed/include/pstd -I/home/user/src/plumber_examples_git/installed/include/proto"
make[1]: Entering directory '/home/user/src/plumber_examples_git/src/extractor_example/readsock'
gcc -fPIC -shared -Wl,-soname,libreadsock.so -o ../bin/libreadsock.so readsock.o -L/home/user/src/plumber_examples_git/installed/lib -lpstd -lproto -L/home/user/src/plumber_examples_git/installed/lib -lpservlet
make[1]: Leaving directory '/home/user/src/plumber_examples_git/src/extractor_example/readsock'
cd writesock && make -f /home/user/src/plumber_examples_git/installed/lib/plumber/servlet.mk LINKER="gcc" OUTPUT="../bin" LDFLAGS=" -L/home/user/src/plumber_examples_git/installed/lib -lpstd -lproto" CFLAGS="-g -I/home/user/src/plumber_examples_git/installed/include/pstd -I/home/user/src/plumber_examples_git/installed/include/proto"
make[1]: Entering directory '/home/user/src/plumber_examples_git/src/extractor_example/writesock'
gcc -fPIC -shared -Wl,-soname,libwritesock.so -o ../bin/libwritesock.so writesock.o -L/home/user/src/plumber_examples_git/installed/lib -lpstd -lproto -L/home/user/src/plumber_examples_git/installed/lib -lpservlet
make[1]: Leaving directory '/home/user/src/plumber_examples_git/src/extractor_example/writesock'
pscript service.pss
Note that in the final step, pscript service.pss, but there is no such script here:
mypc% ls
bin Makefile readsock test.pss writesock
... so call the one that exists instead:
mypc% pscript test.pss
N[1681122791.629313|runtime_servlet_binary_load@src/runtime/servlet.c:564] Servlet address map: /home/user/src/plumber_examples_git/src/extractor_example/bin/libreadsock.so => [0x7f8c5af5f000]
N[1681122791.629527|runtime_servlet_binary_load@src/runtime/servlet.c:564] Servlet address map: /home/user/src/plumber_examples_git/installed/lib/plumber/servlet/dataflow/libextract.so => [0x7f8c5af59000]
N[1681122791.629702|runtime_servlet_binary_load@src/runtime/servlet.c:564] Servlet address map: /home/user/src/plumber_examples_git/src/extractor_example/bin/libwritesock.so => [0x7f8c5af53000]
^CE[1681122795.312244|_accept@src/module/tcp/module.c:730] Cannot get active request form tne connection pool
E[1681122795.312298|_module_event_loop_main@src/itc/eloop.c:93] failed to accept the incoming request from module #2
N[1681122795.312305|_module_event_loop_main@src/itc/eloop.c:104] Event loop thread has been killed!
Metadata
Metadata
Assignees
Labels
No labels