cad/stepccode fails on -CURRENT since clang-6.0.0 was imported

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cad/stepccode fails on -CURRENT since clang-6.0.0 was imported

Fernando Apesteguía
Hi there,

Since clang-6.0.0 was imported in -CURRENT
(https://svnweb.freebsd.org/base/head/usr.bin/clang/llvm-cov/?view=log),
cad/stepcode fails to build. It built fine in -CURRENT with
clang-5.0.0 on both i386 and amd64.

The full log can be found here (although I can't acces theat URL
anymore, how long do they last?):

Log URL:
http://beefy11.nyi.freebsd.org/data/head-i386-default/p459899_s328300/logs/stepcode-0.8_3.log
Build URL:
http://beefy11.nyi.freebsd.org/build.html?mastername=head-i386-default&build=p459899_s328300

Last lines of the error log are as follows:

In file included from
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/cllazyfile/lazy_test.cc:1:
In file included from
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/cllazyfile/lazyInstMgr.h:8:
In file included from
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/cllazyfile/lazyDataSectionReader.h:6:
In file included from
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/cllazyfile/sectionReader.h:6:
In file included from
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/cllazyfile/lazyTypes.h:11:
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/base/judy/src/judyL2Array.h:169:28:
error: assigning to 'const std::__1::vector<unsigned long long,
std::__1::allocator<unsigned long long> > *' from incompatible type
'unsigned long long'
                kv.value = ( JudyValue ) 0;
                           ^~~~~~~~~~~~~~~
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/base/judy/src/judyL2Array.h:180:20:
note: in instantiation of member function 'judyL2Array<unsigned long
long, unsigned long long>::mostRecentPair' requested here
            return mostRecentPair();
                   ^
/wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/cllazyfile/lazy_test.cc:48:37:
note: in instantiation of member function 'judyL2Array<unsigned long
long, unsigned long long>::begin' requested here
    instanceRefs_t::cpair p = refs->begin();
                                    ^
1 error generated.
ninja: build stopped: subcommand failed.
*** Error code 1

I have no idea what the reason for the fail is. I had a look at the
change log from 5 to 6 but a lot of things have gone on and I can not
find any specific commit to blame.

Sorry for the delay reporting this, but I didn't have time to have a
look until a couple of days ago.

Can anyone help here?

Thanks in advance.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: cad/stepccode fails on -CURRENT since clang-6.0.0 was imported

Dimitry Andric-4
On 27 Jan 2018, at 18:42, Fernando Apesteguía <[hidden email]> wrote:
>
> Since clang-6.0.0 was imported in -CURRENT
> (https://svnweb.freebsd.org/base/head/usr.bin/clang/llvm-cov/?view=log),
> cad/stepcode fails to build. It built fine in -CURRENT with
> clang-5.0.0 on both i386 and amd64.
...
> /wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/base/judy/src/judyL2Array.h:169:28:
> error: assigning to 'const std::__1::vector<unsigned long long,
> std::__1::allocator<unsigned long long> > *' from incompatible type
> 'unsigned long long'
>                kv.value = ( JudyValue ) 0;
>                           ^~~~~~~~~~~~~~~

Like gcc 6 and higher, clang 6 now defaults to -std=gnu++14, and from
C++11 onwards, you must use 'nullptr' if you mean a null pointer, not
the integer 0.

You can either force the port to be compiled with -std=gnu++98 (by
adding USE_CXXSTD=gnu++98 to the port Makefile), or change the two
instances where these assignments are being done, e.g.:

--- src/base/judy/src/judyL2Array.h.orig        2014-12-26 20:12:05 UTC
+++ src/base/judy/src/judyL2Array.h
@@ -166,7 +166,7 @@ class judyL2Array {
                 kv.value = *_lastSlot;
                 _success = true;
             } else {
-                kv.value = ( JudyValue ) 0;
+                kv.value = nullptr;
                 _success = false;
             }
             kv.key = _buff[0];
--- src/base/judy/src/judyS2Array.h.orig        2014-12-26 20:12:05 UTC
+++ src/base/judy/src/judyS2Array.h
@@ -191,7 +191,7 @@ class judyS2Array {
                 kv.value = *_lastSlot;
                 _success = true;
             } else {
-                kv.value = ( JudyValue ) 0;
+                kv.value = nullptr;
                 _success = false;
             }
             kv.key = _buff;

-Dimitry


signature.asc (230 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cad/stepccode fails on -CURRENT since clang-6.0.0 was imported

Fernando Apesteguía
El 27 ene. 2018 22:41, "Dimitry Andric" <[hidden email]> escribió:

On 27 Jan 2018, at 18:42, Fernando Apesteguía <[hidden email]>
wrote:
>
> Since clang-6.0.0 was imported in -CURRENT
> (https://svnweb.freebsd.org/base/head/usr.bin/clang/llvm-cov/?view=log),
> cad/stepcode fails to build. It built fine in -CURRENT with
> clang-5.0.0 on both i386 and amd64.
...
> /wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/
src/base/judy/src/judyL2Array.h:169:28:
> error: assigning to 'const std::__1::vector<unsigned long long,
> std::__1::allocator<unsigned long long> > *' from incompatible type
> 'unsigned long long'
>                kv.value = ( JudyValue ) 0;
>                           ^~~~~~~~~~~~~~~

Like gcc 6 and higher, clang 6 now defaults to -std=gnu++14, and from
C++11 onwards, you must use 'nullptr' if you mean a null pointer, not
the integer 0.

You can either force the port to be compiled with -std=gnu++98 (by
adding USE_CXXSTD=gnu++98 to the port Makefile), or change the two
instances where these assignments are being done, e.g.:

--- src/base/judy/src/judyL2Array.h.orig        2014-12-26 20:12:05 UTC
+++ src/base/judy/src/judyL2Array.h
@@ -166,7 +166,7 @@ class judyL2Array {
                 kv.value = *_lastSlot;
                 _success = true;
             } else {
-                kv.value = ( JudyValue ) 0;
+                kv.value = nullptr;
                 _success = false;
             }
             kv.key = _buff[0];
--- src/base/judy/src/judyS2Array.h.orig        2014-12-26 20:12:05 UTC
+++ src/base/judy/src/judyS2Array.h
@@ -191,7 +191,7 @@ class judyS2Array {
                 kv.value = *_lastSlot;
                 _success = true;
             } else {
-                kv.value = ( JudyValue ) 0;
+                kv.value = nullptr;
                 _success = false;
             }
             kv.key = _buff;

-Dimitry


I will try the later and send the patch upstream.

Thanks!
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"