I am trying to figure out why you are getting the warning. I am not sure why.  
(I assume you meant 1.3.1 not 1.2.1 in the email)

What version of the compiler are you using?

I personally am using VS2015 the cl version is 19.00.24215.1.

You have a few options to try.

1st option:
I know it may be silly but the first thing I would try is a clean build:
run clean
run build

2nd option:
skip that one sample and see if it will still build everything else:
open iotivity/resource/examples/SConscript
find the devicediscoveryserver in the example_names array.  Comment out that 
one sample.
rebuild

3rd option:
Manually turn of the build flag that causes the build to fail on code warnings. 
See if you can complete the build without the build flag
Open iotivity/build_common/windows/SConscript
Find the line env.AppendUnique(CCFLAGS=['/W4', '/WX'])
Remove the /WX option.
rebuild

options 2 and 3 are modifying the build and will indicate that we have some 
build problems that must be fixed.

If 3 works I could create a patch that lets up apply the ERROR_ON_WARN build 
flag to windows builds. This would be a good work around for the short term but 
we should also figure out why you are getting errors.




-----Original Message-----
From: Wouter van der Beek (wovander) [mailto:[email protected]] 
Sent: Wednesday, November 22, 2017 9:53 AM
To: Nash, George <[email protected]>; Philippe Coval 
<[email protected]>; [email protected]
Subject: RE: [dev] build issues on windows with rel1.3

I am using the scons command in windows box (e.g. no bash).
The 1.2.1 is compiling and almost linking (e.g. missing _Sleep, which I can fix 
I think by adding an C file in the example).

With the run.bat different things are happening..
It needs now an different github repo for libcoap...
Installed that (using bash)..

Run build gives ultimately an error:

ce\oc_logger\include /Z7
simpleclient.cpp
NOTE: Use of this header (bool_trait_def.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
NOTE: Use of this header (bool_trait_def.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
NOTE: Use of this header (bool_trait_def.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
NOTE: Use of this header (bool_trait_def.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
NOTE: Use of this header (template_arity_spec.hpp) is deprecated
resource\examples\devicediscoveryserver.cpp(52): error C2220: warning treated 
as  error - no 'object' file generated
resource\examples\devicediscoveryserver.cpp(52): warning C4592: 'dataModelVersio
ns': symbol will be dynamically initialized (implementation limitation)
scons: *** [out\windows\win32\amd64\debug\resource\examples\devicediscoveryserve
r.obj] Error 2
scons: building terminated because of errors.
SCons failed - exiting run.bat with code 3


Hence all the coap issues are now gone, so it just limited to the examples...
Basically my task is to investigate how to make new examples easy...
So what do I need to do to:
- remove this example
- create a new example from scratch..

Kind Regards,
Wouter

-----Original Message-----
From: Nash, George [mailto:[email protected]]
Sent: 22 November 2017 17:28
To: Wouter van der Beek (wovander) <[email protected]>; Philippe Coval 
<[email protected]>; [email protected]
Subject: RE: [dev] build issues on windows with rel1.3

Currently, the ERROR_ON_WARN is limited to the Linux build.  The fail on 
warning in windows was put in place months before the Linux cleanup effort was 
done. It was added by one of the developers from Microsoft. They did not add a 
build flag to turn of the failures.

Wouter what build options are you using when building windows? How are you 
building.  I would recommend using the 'run.bat' script,  95% of the time I 
build windows by running 'run build' this will run SCons with all the correct 
build options for you. Window requires a lot of build options that normally you 
would not consider.

https://wiki.iotivity.org/windows

I can quickly create a patch to make the ERROR_ON_WARN build flag work on 
windows as well if it is needed but my guess is that we should check how you 
are building on windows first.

George

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Wouter van der 
Beek (wovander)
Sent: Wednesday, November 22, 2017 3:35 AM
To: Philippe Coval <[email protected]>; 
[email protected]
Subject: Re: [dev] build issues on windows with rel1.3

Thx,

How do I get an jira account?
Because the link to request an account gives the message:
Your JIRA administrator has not yet configured this contact form.

Basically I do not want to sign up for testing windows... this just should work 
out of the box...
My current task is to figure out how to create sample applications quickly.. 
e.g. just another folder under examples..
Compile the new code and link.
My preferred environment is windows... 

Kind Regards,
Wouter

-----Original Message-----
From: Philippe Coval [mailto:[email protected]]
Sent: 22 November 2017 11:21
To: Wouter van der Beek (wovander) <[email protected]>; 
[email protected]
Subject: Re: [dev] build issues on windows with rel1.3

On 22/11/17 12:06, Wouter van der Beek (wovander) wrote:
>
> Hi Phil,
>
> 
>
> ERROR_ON_WARN=False  Nope does not work.

Well it should


> -i make sure that it continues compiling but the link stage does not
work, since objects are missing.

It looks like a windows specific case, I can help on linux family if you're 
able to reproduce there too


> How do I report a an bug?

https://jira.iotivity.org/ Is a good place to start

You can attach the full trace of
scons -k ERROR_ON_WARN=False  > build.log.txt

Also you can add 'build' , 'windows', '1.2-rel' labels to help triage

See you in jira
 
--
mailto:[email protected] gpg:0x467094BC 
https://blogs.s-osg.org/author/pcoval/


_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev
_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to