[Scons-users] scons and openmp problem

Bill Deegan bill at baddogconsulting.com
Thu May 5 14:42:56 EDT 2016


Mohammed,

O.k. There's a FAQ which should help you.

http://scons.org/faq.html#Why_doesn.27t_SCons_find_my_compiler.2BAC8-linker.2BAC8-etc..3F_I_can_execute_it_just_fine_from_the_command_line
.

-Bill

On Thu, May 5, 2016 at 1:41 PM, mohammed shambakey <shambakey1 at gmail.com>
wrote:

> Hi Bill
>
> When running "which g++" it gives me
>
> /opt/apps/gcc/5.3.0/bin/g++
>
> On Thu, May 5, 2016 at 1:26 PM, Bill Deegan <bill at baddogconsulting.com>
> wrote:
>
>> Do you have multitple versions of gcc installed?
>> What's the path to the one you want to use?
>>
>> My first guess is you're picking up and older version of g++ from
>> /usr/bin and your gcc 5.3.0 is installed elsewhere so you'll have to be
>> explicit about it's location.
>>
>> -Bill
>>
>> On Thu, May 5, 2016 at 1:10 PM, mohammed shambakey <shambakey1 at gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> I'm trying to compile a c++ program that has openmp reduction clause.
>>> When running scons, it gives me the following error:
>>>
>>> scons: Building targets ...
>>> g++ -o etc/section.o -c -Wall -fopenmp -O2 -Ietc -Ilib etc/section.cc
>>> etc/section.cc: In function 'int data_location(Section*, char*)':
>>> etc/section.cc:18: error: expected '+', '*', '-', '&', '^', '|', '&&',
>>> or '||' before 'min'
>>> scons: *** [etc/section.o] Error 1
>>> scons: building terminated because of errors.
>>>
>>> I tried to compile the etc/section.cc file with g++ only as indicated in
>>> the second line in the above error as follows:
>>>
>>> g++ -o etc/section.o -c -Wall -fopenmp -O2 -Ietc -Ilib etc/section.cc
>>>
>>> and it compiled correctly.
>>>
>>> The g++ version is g++ (GCC) 5.3.0, with support for openmp 4.0. I tried
>>> simple example for "reduction" with "min" operation and it worked correctly
>>> when compiled with g++ (I haven't tried it with scons)
>>>
>>> I don't know what is wrong?
>>>
>>> Thanks
>>>
>>> --
>>> Mohammed
>>>
>>> _______________________________________________
>>> Scons-users mailing list
>>> Scons-users at scons.org
>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>
>>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
>
> --
> Mohammed
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160505/148e0dee/attachment-0001.html>


More information about the Scons-users mailing list