Skip to content

deal with vs 2015 being pedantic about alignment issues.#1471

Closed
bdeluca wants to merge 1 commit intoAcademySoftwareFoundation:masterfrom
bdeluca:trytobuildwindows
Closed

deal with vs 2015 being pedantic about alignment issues.#1471
bdeluca wants to merge 1 commit intoAcademySoftwareFoundation:masterfrom
bdeluca:trytobuildwindows

Conversation

@bdeluca
Copy link

@bdeluca bdeluca commented Aug 17, 2016

It still breaks compiling tryConvert(...) as it wasnt to call tryConvert(T) rathern than tryConvert(const T&)

s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(178): error C2718: 'const OpenImageIO::v1_7::simd::int4': actual parameter with requested alignment of 16 won't be aligned
s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(600): note: see reference to class template instantiation 'tinyformat::detail::is_convertible<const T &,int>' being compiled
        with
        [
            T=OpenImageIO::v1_7::simd::int4
        ]
s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(883): note: see reference to function template instantiation 'void tinyformat::detail::FormatIterator::accept<T1>(const T &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T=OpenImageIO::v1_7::simd::int4
        ]
s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(944): note: see reference to function template instantiation 'void tinyformat::detail::format<T1,T2>(tinyformat::detail::FormatIterator &,const T1 &,const T2 &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T2=OpenImageIO::v1_7::simd::int4
        ]
S:\storage\git\oiio.git\src\include\OpenImageIO/strutil.h(91): note: see reference to function template instantiation 'void tinyformat::format<T1,T2>(std::ostream &,const char *,const T1 &,const T2 &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T2=OpenImageIO::v1_7::simd::int4
        ]
S:\storage\git\oiio.git\src\libutil\simd_test.cpp(420): note: see reference to function template instantiation 'std::string OpenImageIO::v1_7::Strutil::format<OpenImageIO::v1_7::simd::int4,OpenImageIO::v1_7::simd::int4>(const char *,const T1 &,const T2 &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T2=OpenImageIO::v1_7::simd::int4
        ]

It still breaks compiling  tryConvert(...) as it wasnt to call tryConvert(T) rathern than tryConvert(const T&)

s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(178): error C2718: 'const OpenImageIO::v1_7::simd::int4': actual parameter with requested alignment of 16 won't be aligned
s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(600): note: see reference to class template instantiation 'tinyformat::detail::is_convertible<const T &,int>' being compiled
        with
        [
            T=OpenImageIO::v1_7::simd::int4
        ]
s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(883): note: see reference to function template instantiation 'void tinyformat::detail::FormatIterator::accept<T1>(const T &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T=OpenImageIO::v1_7::simd::int4
        ]
s:\storage\git\oiio.git\src\include\openimageio\tinyformat.h(944): note: see reference to function template instantiation 'void tinyformat::detail::format<T1,T2>(tinyformat::detail::FormatIterator &,const T1 &,const T2 &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T2=OpenImageIO::v1_7::simd::int4
        ]
S:\storage\git\oiio.git\src\include\OpenImageIO/strutil.h(91): note: see reference to function template instantiation 'void tinyformat::format<T1,T2>(std::ostream &,const char *,const T1 &,const T2 &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T2=OpenImageIO::v1_7::simd::int4
        ]
S:\storage\git\oiio.git\src\libutil\simd_test.cpp(420): note: see reference to function template instantiation 'std::string OpenImageIO::v1_7::Strutil::format<OpenImageIO::v1_7::simd::int4,OpenImageIO::v1_7::simd::int4>(const char *,const T1 &,const T2 &)' being compiled
        with
        [
            T1=OpenImageIO::v1_7::simd::int4,
            T2=OpenImageIO::v1_7::simd::int4
        ]
@bdeluca
Copy link
Author

bdeluca commented Aug 17, 2016

This builds on windows in appveyor here and fails in linux/osx
on my systems
This fails on windows and builds in linux/osx

@bdeluca bdeluca closed this Aug 17, 2016
@lgritz
Copy link
Collaborator

lgritz commented Aug 17, 2016

I don't quite understand why this should be an error. Are aligned types not allowed to be passed as value (stack) parameters?

@bdeluca
Copy link
Author

bdeluca commented Aug 18, 2016

its a little bit over my head, but I think there is no guarantee that the copied value is aligned.
ms says this https://msdn.microsoft.com/en-us/library/sxe76d9e.aspx

it seems to have been triggered by me trying to use boost 1.60 there is some more about it here https://datastax-oss.atlassian.net/browse/CPP-341

@lgritz
Copy link
Collaborator

lgritz commented Aug 18, 2016

Are you compiling for a 32 bit target?

Why do my appveyor builds succeed?

@bdeluca
Copy link
Author

bdeluca commented Aug 18, 2016

I don't think It was a 32 bit target but with nmake It was hard to be 100% sure.
I think it came down you appveyor running boost 1.59 vs the boost 1.60 trying.

Next week I can come back to trying it with 1.60 again and confirm it was this. All my cpu is compiling other stuff today.

GerHobbelt pushed a commit to GerHobbelt/oiio that referenced this pull request Dec 10, 2024
…SoftwareFoundation#1471)

* Remove OpenColorIOHeaders target

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Avoid hardcoding install paths

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Update remaining hardcoded install paths

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Replace LIB_SUFFIX by CMAKE_INSTALL_LIBDIR

Signed-off-by: Rémi Achard <remiachard@gmail.com>

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
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

Successfully merging this pull request may close these issues.

2 participants