Thread: [Cppcms-users] hello_world incorrectly working
Brought to you by:
artyom-beilis
From: Basile S. <ba...@st...> - 2012-12-08 11:23:36
|
Hello All, I just discovered, downloaded and compiled cppcms-1.0.2 Linux/Debian/Sid/AMD64 GCC 4.7 When running the hello_world example (in the examples/hello_world source directory as ../../build/hello_world -c config.js I am getting the following HTML page http://localhost:8080/hello <html><body> <h1>Hello World!</h1> Dec 8, 2012<br> 10:14:08 AM<br> Dec 8, 2012 10:14:08 AM<br> TEXT<br> text<br> Text<br> <text><br> text%20text<br> dGV4dA<br> Saturday, December 8, 2012 10:14:08 AM GMT+01:00<br> Saturday, December 8, 2012 10:14:08 AM GMT+01:00<br> c<br> Set-Cookie:test=1354958047; Version=1<br/> Dec 8, 2012 hello <br>passed 0 days<br> passed one day<br> passed 2 days<br> passed 3 days<br> passed 4 days<br> passed 5 days<br> passed 6 days<br> passed 7 days<br> passed 8 days<br> passed 9 days<br> passed 10 days<br> passed 11 days<br> passed 12 days<br> passed 13 days<br> passed 14 days<br> passed 15 days<br> passed 16 days<br> passed 17 days<br> passed 18 days<br> passed 19 days<br> passed 20 days<br> passed 21 days<br> passed 22 days<br> passed 23 days<br> passed 24 days<br> passed 25 days<br> passed 26 days<br> passed 27 days<br> passed 28 days<br> passed 29 days<br> <body></html> which is not what I expect.... What did I do wrong? Regards. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} *** |
From: Sergey <ser...@gm...> - 2012-12-08 11:50:05
|
Basile Starynkevitch <basile@...> writes: > which is not what I expect.... > > What did I do wrong? > > Regards. I don't understand. What is a problem? |
From: Basile S. <ba...@st...> - 2012-12-08 14:28:19
|
On Sat, Dec 08, 2012 at 11:44:18AM +0000, Sergey wrote: > Basile Starynkevitch <basile@...> writes: > > > which is not what I expect.... > > > > > What did I do wrong? > > > > Regards. > > I don't understand. What is a problem? Th produced HTML contains a lot of garbage and is not valid HTML. [notice that there is no </body> in the output I have shown] It is not the HTML code which the following routine should output void my_hello_world::main(std::string /*url*/) { response().out()<< "<html>\n" "<body>\n" " <h1>Hello World</h1>\n" "</body>\n" "</html>\n"; } In other words, it seems that something is buggy in the example (or probably in the cppcms library). Can someone reproduce the bug? Cheers -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} *** |
From: Artyom B. <art...@ya...> - 2012-12-08 14:32:45
|
You are running invalid executable file, not one you build, but an internal test executable for CppCMS's build directory called hello_world. Watch carefully what are you doing :-) Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Basile Starynkevitch <ba...@st...> >To: cpp...@li... >Sent: Saturday, December 8, 2012 4:28 PM >Subject: Re: [Cppcms-users] hello_world incorrectly working > >On Sat, Dec 08, 2012 at 11:44:18AM +0000, Sergey wrote: >> Basile Starynkevitch <basile@...> writes: >> >> > which is not what I expect.... >> >> > >> > What did I do wrong? >> > >> > Regards. >> >> I don't understand. What is a problem? > >Th produced HTML contains a lot of garbage and is not valid HTML. >[notice that there is no </body> in the output I have shown] >It is not the HTML code which the following routine should output > void my_hello_world::main(std::string /*url*/) > { > response().out()<< > "<html>\n" > "<body>\n" > " <h1>Hello World</h1>\n" > "</body>\n" > "</html>\n"; > } > >In other words, it seems that something is buggy in the example >(or probably in the cppcms library). > >Can someone reproduce the bug? > >Cheers >-- >Basile STARYNKEVITCH http://starynkevitch.net/Basile/ >email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 >8, rue de la Faiencerie, 92340 Bourg La Reine, France >*** opinions {are only mines, sont seulement les miennes} *** > >------------------------------------------------------------------------------ >LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial >Remotely access PCs and mobile devices and provide instant support >Improve your efficiency, and focus on delivering more value-add services >Discover what IT Professionals Know. Rescue delivers >http://p.sf.net/sfu/logmein_12329d2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: Basile S. <ba...@st...> - 2012-12-08 14:38:47
|
On Sat, Dec 08, 2012 at 06:32:37AM -0800, Artyom Beilis wrote: > You are running invalid executable file, not one you build, but an internal test executable for CppCMS's build directory called hello_world. > > Watch carefully what are you doing :-) Then could you give step by step instructions on how to build a *working* hello world example??? (Why can't the one in the distributed tar ball be a valid example? Why distribute it in the first place??) I just recompiled it, with the same buggy result glinka.x86_64 Libs/cppcms-1.0.2/build 15:35 .0 % rm hello_world glinka.x86_64 Libs/cppcms-1.0.2/build 15:35 .0 % make hello_world VERBOSE=1 /usr/bin/cmake -H/usr/src/Libs/cppcms-1.0.2 -B/usr/src/Libs/cppcms-1.0.2/build --check-build-system CMakeFiles/Makefile.cmake 0 make -f CMakeFiles/Makefile2 hello_world make[1]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' /usr/bin/cmake -H/usr/src/Libs/cppcms-1.0.2 -B/usr/src/Libs/cppcms-1.0.2/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /usr/src/Libs/cppcms-1.0.2/build/CMakeFiles 38 make -f CMakeFiles/Makefile2 CMakeFiles/hello_world.dir/all make[2]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' make -f booster/CMakeFiles/booster.dir/build.make booster/CMakeFiles/booster.dir/depend make[3]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' cd /usr/src/Libs/cppcms-1.0.2/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /usr/src/Libs/cppcms-1.0.2 /usr/src/Libs/cppcms-1.0.2/booster /usr/src/Libs/cppcms-1.0.2/build /usr/src/Libs/cppcms-1.0.2/build/booster /usr/src/Libs/cppcms-1.0.2/build/booster/CMakeFiles/booster.dir/DependInfo.cmake --color= make[3]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' make -f booster/CMakeFiles/booster.dir/build.make booster/CMakeFiles/booster.dir/build make[3]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' make[3]: Nothing to be done for `booster/CMakeFiles/booster.dir/build'. make[3]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' /usr/bin/cmake -E cmake_progress_report /usr/src/Libs/cppcms-1.0.2/build/CMakeFiles 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [ 44%] Built target booster make -f CMakeFiles/cppcms.dir/build.make CMakeFiles/cppcms.dir/depend make[3]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' cd /usr/src/Libs/cppcms-1.0.2/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /usr/src/Libs/cppcms-1.0.2 /usr/src/Libs/cppcms-1.0.2 /usr/src/Libs/cppcms-1.0.2/build /usr/src/Libs/cppcms-1.0.2/build /usr/src/Libs/cppcms-1.0.2/build/CMakeFiles/cppcms.dir/DependInfo.cmake --color= make[3]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' make -f CMakeFiles/cppcms.dir/build.make CMakeFiles/cppcms.dir/build make[3]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' make[3]: Nothing to be done for `CMakeFiles/cppcms.dir/build'. make[3]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' /usr/bin/cmake -E cmake_progress_report /usr/src/Libs/cppcms-1.0.2/build/CMakeFiles 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 [ 94%] Built target cppcms make -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/depend make[3]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' cd /usr/src/Libs/cppcms-1.0.2/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /usr/src/Libs/cppcms-1.0.2 /usr/src/Libs/cppcms-1.0.2 /usr/src/Libs/cppcms-1.0.2/build /usr/src/Libs/cppcms-1.0.2/build /usr/src/Libs/cppcms-1.0.2/build/CMakeFiles/hello_world.dir/DependInfo.cmake --color= make[3]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' make -f CMakeFiles/hello_world.dir/build.make CMakeFiles/hello_world.dir/build make[3]: Entering directory `/xtra2/Libs/cppcms-1.0.2/build' Linking CXX executable hello_world /usr/bin/cmake -E cmake_link_script CMakeFiles/hello_world.dir/link.txt --verbose=1 /usr/bin/c++ -Wall -Wextra -O2 -g CMakeFiles/hello_world.dir/src/hello_world.cpp.o CMakeFiles/hello_world.dir/skin1.cpp.o CMakeFiles/hello_world.dir/skin2.cpp.o -o hello_world -rdynamic libcppcms.so.1.0.2 booster/libbooster.so.0.0.1 -lpthread -lpcre -licuuc -licui18n -licudata -lgcrypt -ldl -lz -Wl,-rpath,/usr/src/Libs/cppcms-1.0.2/build:/usr/src/Libs/cppcms-1.0.2/build/booster make[3]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' /usr/bin/cmake -E cmake_progress_report /usr/src/Libs/cppcms-1.0.2/build/CMakeFiles 79 80 [100%] Built target hello_world make[2]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' /usr/bin/cmake -E cmake_progress_start /usr/src/Libs/cppcms-1.0.2/build/CMakeFiles 0 make[1]: Leaving directory `/xtra2/Libs/cppcms-1.0.2/build' glinka.x86_64 Libs/cppcms-1.0.2/build 15:36 .0 % ../../build/hello_world -c config.js zsh: no such file or directory: ../../build/hello_world glinka.x86_64 Libs/cppcms-1.0.2/build 15:36 .127 % cd /usr/src/Libs/cppcms-1.0.2/examples glinka.x86_64 Libs/cppcms-1.0.2/examples 15:36 .0 % ../../build/hello_world -c config.js zsh: no such file or directory: ../../build/hello_world glinka.x86_64 Libs/cppcms-1.0.2/examples 15:36 .127 % cd hello_world glinka.x86_64 cppcms-1.0.2/examples/hello_world 15:36 .0 % ../../build/hello_world -c config.js Cheers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} *** |
From: Sergey <ser...@gm...> - 2012-12-08 15:25:00
|
cppcms-1.0.2/examples/hello_world make ./hello_world -c config.js |
From: Basile S. <ba...@st...> - 2012-12-08 15:31:56
|
On Sat, Dec 08, 2012 at 03:24:34PM +0000, Sergey wrote: > cppcms-1.0.2/examples/hello_world > make > ./hello_world -c config.js Thanks. That works but I still don't understand why my tentative gave garbage. Cheers -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} *** |
From: Sergey <ser...@gm...> - 2012-12-08 15:47:58
|
Basile Starynkevitch <basile@...> writes: > > On Sat, Dec 08, 2012 at 03:24:34PM +0000, Sergey wrote: > > cppcms-1.0.2/examples/hello_world > > make > > ./hello_world -c config.js > > Thanks. That works but I still don't understand why my tentative gave garbage. > > Cheers > Because its other programm. Open cppcms-1.0.2/src/hello_world.cpp and you se. Use examples/ and you can also look tests/ |
From: Sergey <ser...@gm...> - 2012-12-08 15:53:03
|
Basile Starynkevitch <basile@...> writes: > Thanks. That works but I still don't understand why my tentative gave garbage. > > Cheers > You have to look what you run. |