when ./configure looks for Gem sources and doesn't find them, it is misleading: it says one has to change configure.ac and re-run autoconf. However, --with-gemdir also does the job and does not require autoconf.
If i make a typo like --with-gem-dir instead of --with-gemdir, ./configure accepts it, ignores it, and doesn't complain about unknown option.
Then when I try compiling it:
g++ -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -DGEM2PDP_VERSION="0.6" -g -I../../pd/src -I. -I../pdp/include -I/home/matju/src/gem-cvs/Gem/src -o pix_2pdp.o -c pix_2pdp.cpp pix_2pdp.cpp: In member function `virtual void pix_2pdp::bangMess()': pix_2pdp.cpp:137: error: jump to case label pix_2pdp.cpp:103: error: crosses initialization of `const int row_length' pix_2pdp.cpp:102: error: crosses initialization of `unsigned char*pixel2' pix_2pdp.cpp:101: error: crosses initialization of `unsigned char*pixel' pix_2pdp.cpp:99: error: crosses initialization of `int cols' pix_2pdp.cpp:98: error: crosses initialization of `int row' pix_2pdp.cpp:155: error: jump to case label pix_2pdp.cpp:103: error: crosses initialization of `const int row_length' pix_2pdp.cpp:102: error: crosses initialization of `unsigned char*pixel2' pix_2pdp.cpp:101: error: crosses initialization of `unsigned char*pixel' pix_2pdp.cpp:99: error: crosses initialization of `int cols' pix_2pdp.cpp:98: error: crosses initialization of `int row'
make: *** [pix_2pdp.o] Error 1
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
On Wed, 21 Dec 2005, Mathieu Bouchard wrote:
g++ -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -DGEM2PDP_VERSION="0.6" -g -I../../pd/src -I. -I../pdp/include -I/home/matju/src/gem-cvs/Gem/src -o pix_2pdp.o -c pix_2pdp.cpp pix_2pdp.cpp: In member function `virtual void pix_2pdp::bangMess()': pix_2pdp.cpp:137: error: jump to case label pix_2pdp.cpp:103: error: crosses initialization of `const int row_length' make: *** [pix_2pdp.o] Error 1
patch below.
--- pix_2pdp.cpp 11 Oct 2005 15:34:35 -0000 1.4 +++ pix_2pdp.cpp 21 Dec 2005 14:32:51 -0000 @@ -94,7 +94,7 @@ break;
// YUV - case GL_YUV422_GEM: + case GL_YUV422_GEM: { int row=gem_ysize>>1; int cols=gem_xsize>>1; short u,v; @@ -131,7 +131,7 @@ pY += gem_xsize; pY2 += gem_xsize; } pdp_packet_pass_if_valid(m_pdpoutlet, &m_packet0); - break; + } break;
// grey case GL_LUMINANCE:
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
Hallo Matju!
thanks for the diff, I had the same error here ... I will commit it ...
LG Georg
On Dec 21, 2005, at 9:31 AM, Mathieu Bouchard wrote:
when ./configure looks for Gem sources and doesn't find them, it is misleading: it says one has to change configure.ac and re-run autoconf. However, --with-gemdir also does the job and does not require autoconf.
If i make a typo like --with-gem-dir instead of --with-gemdir, ./ configure accepts it, ignores it, and doesn't complain about unknown option.
Then when I try compiling it:
g++ -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -DGEM2PDP_VERSION="0.6" -g -I../../pd/src -I. -I../pdp/include -I/home/matju/src/gem-cvs/Gem/ src -o pix_2pdp.o -c pix_2pdp.cpp pix_2pdp.cpp: In member function `virtual void pix_2pdp::bangMess()': pix_2pdp.cpp:137: error: jump to case label
...well, this is just a switch(), so maybe adding parentheses would help...? But, I tried it here with gcc 4.0.1, and get no errors/ warnings at all: here's my compile line:
g++ -DPD -Os -funroll-loops -fomit-frame-pointer -ffast-math -Wall - W -Wno-unused -Wno-parentheses -Wno-switch -DGEM2PDP_VERSION="0.7" - g -I/Users/tigital/puredataDev/devel_0_39/pd/src -I. -I../pdp/ include -I../../Gem/src -I/sw/include -o pix_2pdp.o -c pix_2pdp.cpp rm -f pix_2pdp.pd_darwin
jamie
On Wed, 21 Dec 2005, james tittle wrote:
pix_2pdp.cpp:137: error: jump to case label
...well, this is just a switch(), so maybe adding parentheses would help...? But, I tried it here with gcc 4.0.1, and get no errors/warnings at all:
This must be because your version of gcc does better dataflow analysis and thus shrinks the scope of those variables, normally at the "}", up to the last line where they are used, such that when switch() performs its goto it doesn't really skip the initialization anymore. In other words, the new GCC corrects the bug in the code by itself. As you can see, newer versions of GCC aren't always more stringent, and in this case, Gcc4 is more slack.
The manual fix is to put braces after the "case:" until the "break;", which is what the diff did (the one I posted in reply to my mail).
I used to use gcc 4.0.2 but I reverted to 3.3.5 because ltilib wouldn't compile with gcc 4.0.2.
here's my compile line: g++ -DPD -Os -funroll-loops -fomit-frame-pointer -ffast-math -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -DGEM2PDP_VERSION="0.7" -g -I/Users/tigital/puredataDev/devel_0_39/pd/src -I. -I../pdp/include -I../../Gem/src -I/sw/include -o pix_2pdp.o -c pix_2pdp.cpp
Could you please explain why -Os instead of -O2 or -O3 ?? that's really puzzling me.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
On Dec 22, 2005, at 12:20 PM, Mathieu Bouchard wrote:
Could you please explain why -Os instead of -O2 or -O3 ?? that's really puzzling me.
...-Os is the apple recommended optimization, which I've been using lately (but haven't really done any testing vs. -O3)...basically keeps code small while doing -O2+ levels of optimization, which I think is a win for ppc's...I need to start playing with adding in the auto-vectorization, see if we get any wins there...
jamie