[Ipopt] Random number generator compilation error

Jason Moore moorepants at gmail.com
Tue Jul 14 13:14:42 EDT 2015


I just realized this solution did not go to the list.

Also, a private email was sent to me with this suggestion:

"I have today the same error but I do this and works:
run configure with this argument
coin_skip_warn_cxxflags=yes"

Which I have not tested.


Jason
moorepants.info
+01 530-601-9791

On Fri, Jul 3, 2015 at 12:29 PM, Jason Moore <moorepants at gmail.com> wrote:

> Stefan,
>
> That fixes it. `make test` passes after compile.
>
> Thanks!
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> On Fri, Jul 3, 2015 at 12:18 PM, Stefan Vigerske <stefan at math.hu-berlin.de
> > wrote:
>
>> Hi,
>>
>> can you try whether changing __GNUC_PATCHLEVEL__ == 3 to
>> __GNUC_PATCHLEVEL__ >= 2 in src/Common/IpUtils.cpp (2 places) will help?
>>
>> Stefan
>>
>>
>>
>>
>> On 07/03/2015 09:06 PM, Jason Moore wrote:
>>
>>> I'm on Ubuntu 14.04 with gcc 4.8.2 and I'm getting a compile error about
>>> a
>>> random number generator:
>>>
>>>   g++ -DHAVE_CONFIG_H -I. -I../../../../Ipopt/src/Common -O3 -pipe
>>> -DNDEBUG
>>> -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall
>>> -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas
>>> -Wno-long-long -DIPOPT_BUILD -MT IpUtils.lo -MD -MP -MF .deps/IpUtils.Tpo
>>> -c ../../../../Ipopt/src/Common/IpUtils.cpp  -fPIC -DPIC -o
>>> .libs/IpUtils.o
>>> ../../../../Ipopt/src/Common/IpUtils.cpp:182:6: error: #error "don't have
>>> function for random number generator"
>>>   #    error "don't have function for random number generator"
>>>        ^
>>> ../../../../Ipopt/src/Common/IpUtils.cpp:203:6: error: #error "don't have
>>> function for random number generator"
>>>   #    error "don't have function for random number generator"
>>>        ^
>>> ../../../../Ipopt/src/Common/IpUtils.cpp: In function 'Ipopt::Number
>>> Ipopt::IpRandom01()':
>>> ../../../../Ipopt/src/Common/IpUtils.cpp:187:3: warning: no return
>>> statement in function returning non-void [-Wreturn-type]
>>>     }
>>>     ^
>>> make[3]: *** [IpUtils.lo] Error 1
>>> make[3]: Leaving directory
>>> `/home/vagrant/CoinIpopt/build/Ipopt/src/Common'
>>> make[2]: *** [all] Error 2
>>> make[2]: Leaving directory
>>> `/home/vagrant/CoinIpopt/build/Ipopt/src/Common'
>>> make[1]: *** [all-recursive] Error 1
>>> make[1]: Leaving directory `/home/vagrant/CoinIpopt/build/Ipopt'
>>> make: *** [all-recursive] Error 1
>>> vagrant at vagrant-ubuntu-trusty-64:~/CoinIpopt/build$ aptitude show gcc
>>> Package: gcc
>>> State: installed
>>> Automatically installed: yes
>>> Version: 4:4.8.2-1ubuntu6
>>> Priority: optional
>>> Section: devel
>>> Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
>>> Architecture: amd64
>>> Uncompressed Size: 42.0 k
>>> Depends: cpp (>= 4:4.8.2-1ubuntu6), gcc-4.8 (>= 4.8.2-5~)
>>> Recommends: libc6-dev | libc-dev
>>> Suggests: gcc-multilib, make, manpages-dev, autoconf, automake1.9,
>>> libtool,
>>> flex, bison, gdb, gcc-doc
>>> Conflicts: gcc-doc (< 1:2.95.3)
>>> Provides: c-compiler
>>> Description: GNU C compiler
>>>   This is the GNU C compiler, a fairly portable optimizing compiler for
>>> C.
>>>
>>>   This is a dependency package providing the default GNU C compiler.
>>>
>>> I've seen some other messages online saying that this is an error with
>>> gcc
>>> 4.8.3 and that it should be fixed in trunk. I've tried 3.12 and trunk
>>> (btw,
>>> this commit https://projects.coin-or.org/Ipopt/changeset/2584 is causing
>>> configure to fail for me because it can't locate one of the new files or
>>> something), but both fail with the same compile error.
>>>
>>> Any ideas what is wrong?
>>>
>>> Jason
>>> moorepants.info
>>> +01 530-601-9791
>>>
>>>
>>>
>>> _______________________________________________
>>> Ipopt mailing list
>>> Ipopt at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/ipopt
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20150714/5724e084/attachment.html>


More information about the Ipopt mailing list