Re: Need help to build new version of ispc
On 2018-11-07 10:57 a.m., Jerry James wrote: > On Wed, Nov 7, 2018 at 11:07 AM Luya Tshimbalanga > > wrote: >> Getting the snapshot of ispc to support llvm 7.0 and needed by embree, it looks like the build broke at the following line: >> >> rc/main.cpp: In function 'int main(int, char**)': >> src/main.cpp:669:19: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] >> flags |= Module::GeneratePIC; >> ~~^ >> src/main.cpp:685:17: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] >> flags |= Module::GenerateFlatDeps; >> ~~^ >> src/main.cpp:688:62: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] >> flags |= Module::GenerateMakeRuleForDeps | Module::OutputDepsToStdout; >> ^~ >> src/main.cpp:773:13: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] >> flags &= ~Module::OutputDepsToStdout; >> ~~^~ >> src/main.cpp:787:13: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] >> flags &= Module::GenerateMakeRuleForDeps; >> ~~^ > > The problem is that enumerated types are supposed to be used as such, > not as bits in an integer, which is what this code is trying to do. > In order to compute the bitwise or, the enum elements have to be > converted to ints. Then when the assignment part is to be done, > you've got an int that needs to be assigned to a variable of enum > type. That's what the error message is complaining about. The > simplest fix for you, the packager, is to add -fpermissive to the > build flags. > > It seems not enough when applying on %make_build gcc OPT="%{optflags} -fpermissive" LDFLAGS="%{__global_ldflags} -fpermissive" Extracted from ispc.spec including in the original post. As the result, At global scope: cc1plus: error: unrecognized command line option '-Wno-deprecated-register' [-Werror] cc1plus: error: unrecognized command line option '-Wno-c99-extensions' [-Werror] cc1plus: all warnings being treated as errors make: *** [Makefile:288: objs/main.o] Error 1 make: *** Waiting for unfinished jobs Compiling src/llvmutil.cpp Compiling src/ispc.cpp Compiling src/expr.cpp Compiling src/cbackend.cpp Compiling src/module.cpp src/module.cpp: In member function 'bool Module::writeOutput(Module::OutputType, Module::OutputFlags, const char*, const char*, const char*, DispatchHeaderInfo*)': src/module.cpp:1301:13: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if (strcasecmp(suffix, "c") && strcasecmp(suffix, "cc") && ^~ src/module.cpp:1305:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' break; ^ src/module.cpp:1307:13: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if (strcasecmp(suffix, "c") && strcasecmp(suffix, "cc") && ^~ src/module.cpp:1311:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' break; ^ At global scope: cc1plus: error: unrecognized command line option '-Wno-deprecated-register' [-Werror] cc1plus: error: unrecognized command line option '-Wno-c99-extensions' [-Werror] cc1plus: all warnings being treated as errors make: *** [Makefile:287: objs/module.o] Error 1 Notice the unrecognized command line. I have no idea how to fix that. Luya 0x5E528174D8A2609A.asc Description: application/pgp-keys ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Need help to build new version of ispc
On Wed, Nov 7, 2018 at 11:07 AM Luya Tshimbalanga wrote: > Getting the snapshot of ispc to support llvm 7.0 and needed by embree, it > looks like the build broke at the following line: > > rc/main.cpp: In function 'int main(int, char**)': > src/main.cpp:669:19: error: invalid conversion from 'int' to > 'Module::OutputFlags' [-fpermissive] > flags |= Module::GeneratePIC; > ~~^ > src/main.cpp:685:17: error: invalid conversion from 'int' to > 'Module::OutputFlags' [-fpermissive] >flags |= Module::GenerateFlatDeps; >~~^ > src/main.cpp:688:62: error: invalid conversion from 'int' to > 'Module::OutputFlags' [-fpermissive] >flags |= Module::GenerateMakeRuleForDeps | > Module::OutputDepsToStdout; > > ^~ > src/main.cpp:773:13: error: invalid conversion from 'int' to > 'Module::OutputFlags' [-fpermissive] >flags &= ~Module::OutputDepsToStdout; >~~^~ > src/main.cpp:787:13: error: invalid conversion from 'int' to > 'Module::OutputFlags' [-fpermissive] >flags &= Module::GenerateMakeRuleForDeps; >~~^ The problem is that enumerated types are supposed to be used as such, not as bits in an integer, which is what this code is trying to do. In order to compute the bitwise or, the enum elements have to be converted to ints. Then when the assignment part is to be done, you've got an int that needs to be assigned to a variable of enum type. That's what the error message is complaining about. The simplest fix for you, the packager, is to add -fpermissive to the build flags. The best approach for upstream to take is to convert GeneratePIC, etc. from elements of an enum to #define constants. The most hideous approach for upstream to take is to convert the lines in the error message to this form: flags = static_cast(flags | Module::GeneratePIC); I absolutely do not recommend doing that. If you don't want to build with -fpermissive for some reason, then you could also patch the code to look like that. Again, not recommended. -- Jerry James http://www.jamezone.org/ ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Need help to build new version of ispc
Whoops. Here is the actual message: Getting the snapshot of ispc to support llvm 7.0 and needed by embree, it looks like the build broke at the following line: rc/main.cpp: In function 'int main(int, char**)': src/main.cpp:669:19: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] flags |= Module::GeneratePIC; ~~^ src/main.cpp:685:17: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] flags |= Module::GenerateFlatDeps; ~~^ src/main.cpp:688:62: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] flags |= Module::GenerateMakeRuleForDeps | Module::OutputDepsToStdout; ^~ src/main.cpp:773:13: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] flags &= ~Module::OutputDepsToStdout; ~~^~ src/main.cpp:787:13: error: invalid conversion from 'int' to 'Module::OutputFlags' [-fpermissive] flags &= Module::GenerateMakeRuleForDeps; ~~^ At global scope: See the copr build which include the spec file for analyzing. https://copr-be.cloud.fedoraproject.org/results/luya/ispc-git/fedora-rawhide-x86_64/00820232-ispc/ Hopefully someone provides a fix. Thanks in advance, Luya signature.asc Description: OpenPGP digital signature ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Re: Need help to build new version of ispc
Hi Luya, Je mer, 2018-11-07 je 00:24 -0800, Luya Tshimbalanga skribis: > Ne eblis analizi PGP/MIME-mesaĝon: Failed to decrypt MIME part: Secret > key not found > Ne eblis analizi PGP/MIME-mesaĝon: Failed to decrypt MIME part: Secret > key not found I think you accidentally enabled encryption for your message to the list. Best regards, Carmen signature.asc Description: This is a digitally signed message part ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Need help to build new version of ispc
binAyjGykBAAL.bin Description: PGP/MIME version identification encrypted.asc Description: OpenPGP encrypted message ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org