Skip to contentSkip to conversation

clamav: fix gcc 6.x build failure.

PATCH Superseded Armin Kuster 2 participants 3 messages Aug 20, 2016 – Aug 23, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clamav: fix gcc 6.x build failure.

./llvm/include/llvm/Support/AlignOf.h:57:24: error: expected unqualified-id before 'alignof'
static inline unsigned alignof() { return AlignOf<T>::Alignment; }

                        ^~~~~~~

compile with -std=gnu++98

alt in future is to us llvm3X and configure --with-system-llvm --with-llvm-linking=dynamic.

---
 recipes-security/clamav/clamav_0.99.2.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-security/clamav/clamav_0.99.2.bb +2 -0
index 184d605..73905a7 100644
@@ -50,6 +50,8 @@ EXTRA_OECONF += " --with-user=${UID}  --with-group=${GID} \
             --disable-rpath \
             "
 
+CXXFLAGS += "--std=gnu++98"
+
 do_configure () {
     cd ${S}
     ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 6 lines · Armin Kuster

./llvm/include/llvm/Support/AlignOf.h:57:24: error: expected unqualified-id before 'alignof' static inline unsigned alignof() { return AlignOf<T>::Alignment; }

                       ^~~~~~~

For this error, perhaps its better to ifdef this function definition with

#if __cplusplus <= 199711L
#endif

since it has been added to standard after c++98, that patch (if works) can be upstreamed too.

Quoted 31 lines

compile with -std=gnu++98

alt in future is to us llvm3X and configure --with-system-llvm --with-llvm-linking=dynamic.

---
recipes-security/clamav/clamav_0.99.2.bb | 2 ++

1 file changed, 2 insertions(+)
recipes-security/clamav/clamav_0.99.2.bb +2 -1
index 184d605..73905a7 100644
@@ -50,6 +50,8 @@ EXTRA_OECONF += " --with-user=${UID}  --with-group=${GID} \
            --disable-rpath \
            "
 
+CXXFLAGS += "--std=gnu++98"
+
 do_configure () {
    cd ${S}
    ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
--

2.7.4

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

author
#2 lore raw
Quoted 11 lines · Khem Raj
Quoted 5 lines · Armin Kuster

./llvm/include/llvm/Support/AlignOf.h:57:24: error: expected unqualified-id before 'alignof' static inline unsigned alignof() { return AlignOf<T>::Alignment; }

                        ^~~~~~~

For this error, perhaps its better to ifdef this function definition with

#if __cplusplus <= 199711L
#endif

since it has been added to standard after c++98, that patch (if works) can be upstreamed too.

Ok. I will look into to that. I heard there was an upstream fixed but no update released. I will see how easy it is to backport.

- armin

Quoted 34 lines
Quoted 32 lines

compile with -std=gnu++98

alt in future is to us llvm3X and configure --with-system-llvm --with-llvm-linking=dynamic.

---
recipes-security/clamav/clamav_0.99.2.bb | 2 ++

1 file changed, 2 insertions(+)
recipes-security/clamav/clamav_0.99.2.bb +2 -1
index 184d605..73905a7 100644
@@ -50,6 +50,8 @@ EXTRA_OECONF += " --with-user=${UID}  --with-group=${GID} \
             --disable-rpath \
             "
 
+CXXFLAGS += "--std=gnu++98"
+
 do_configure () {
     cd ${S}
     ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
--

2.7.4

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto