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

Compiling on RHEL6#20

Closed
ciroiriarte opened this issue Oct 16, 2014 · 3 comments
Closed

Compiling on RHEL6 #20

ciroiriarte opened this issue Oct 16, 2014 · 3 comments

Comments

@ciroiriarte
Copy link

I've used packetq in the past with SLES/openSUSE without issues, but currently need to build it on RHEL6. The thing is I'm getting this error:

make all-recursive
make[1]: Entering directory /home/tclcir/PacketQ-master' Making all in src make[2]: Entering directory/home/tclcir/PacketQ-master/src'
g++ -DHAVE_CONFIG_H -I. -I.. -std=c++0x -Wall -Wno-parentheses -Wno-switch -Wno-sign-compare -Wno-char-subscripts -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.cpp
sql.h: In member function 'se::Row* se::Table::create_row()':
sql.h:495: error: object missing in reference to 'se::Row::m_data'
sql.cpp:85: error: from this location
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_algobase.h:66,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/char_traits.h:41,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/string:42,
from sql.h:36,
from sql.cpp:32:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h: In constructor 'std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = int, _U2 = int, T1 = se::Column, T2 = int]':
sql.cpp:1935: instantiated from here
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/stl_pair.h:90: error: invalid conversion from 'int' to 'se::Column
'
make[2]: *** [sql.o] Error 1
make[2]: Leaving directory /home/tclcir/PacketQ-master/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/tclcir/PacketQ-master'
make: *** [all] Error 2

Anybody has seen it?

@aabdnn
Copy link

aabdnn commented Dec 5, 2015

Hi Ciro,
I have run into this same compile error on CentOS 6. Did you ever find a solution to it?

@Per-Grana
Copy link
Contributor

Hi

You can try the change below, it might be less confusing for the compiler:

@@ -82,7 +82,8 @@ Row *Table::create_row()
 {
     if (!m_row_allocator)
     {
-        m_rsize = sizeof(Row) - sizeof(Row::m_data); // exclude the dummy
+        Row *dummy=(Row*)0;
+        m_rsize = sizeof(dummy) - sizeof(dummy->m_data); // exclude the dummy
         m_dsize = m_curpos;
         m_row_allocator = new Allocator<Row>(m_rsize+m_dsize,10000);
     }

@aabdnn
Copy link

aabdnn commented Dec 7, 2015

Thanks for this suggestion Per. It appears to have gotten rid of this specific compiler error. However, there are now other errors. I think this will be a whack-a-mole game, and may take several iterations to fix. I would fix it myself, but I don't know C++, so there's little I can do to fix it myself.

Anyway, it compiles well on newer gcc, so I will get newer gcc packages for CentOS 6 and try them out.

@jelu jelu closed this as completed in 10ae2d6 May 22, 2017
jelu added a commit that referenced this issue May 22, 2017
Fix #20: Support CentOS 6 compiler (and hopefully RHEL6 also)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants