Giter VIP home page Giter VIP logo

thirdparty-asl's People

Contributors

louhafer avatar svigerske avatar tkralphs avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

thirdparty-asl's Issues

windows msys2 build: lt-arithchk.c:318:25: error: '_P_WAIT' undeclared (first use in this function)

I am trying to build Cbc using msys2 on Windows, as detailed in the guide (https://coin-or.github.io/user_introduction.html#) .

After trying:
./coinbrew/coinbrew build Cbc@master --enable-debug --prefix=/home/danid/prog --no-prompt --enable-cbc-parallel --tests=none --build=x86_64-w64-mingw32

I got an error while building ASL:
##################################################

Building ThirdParty/ASL master

##################################################

./.libs/lt-arithchk.c: In function 'main':
./.libs/lt-arithchk.c:318:16: warning: implicit declaration of function '_spawnv' [-Wimplicit-function-declaration]
318 | rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
| ^~~~~~~
./.libs/lt-arithchk.c:318:25: error: '_P_WAIT' undeclared (first use in this function)
318 | rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
| ^~~~~~~
./.libs/lt-arithchk.c:318:25: note: each undeclared identifier is reported only once for each function it appears in
strip: './arithchk.exe': No such file
./libtool: line 11068: ./arithchk.exe: No such file or directory
/bin/sh: ./arithchk.exe: No such file or directory
make: *** [Makefile:1351: arith.h] Error 127

I installed the dependencies cited in the guide and checked the ones listed in travis, could this be a GCC 10 problem ?

issue with sed and paths in compile_Unix_ASL.in

Line 50 in compile_Unix_ASL.in is:

sed -e 's/ ar / @AR@ /g' \

which can cause an sed: bad option in substitution expression error when @AR@ gets replaced with a full path (e.g. when $AR=/opt/x86_64-linux-gnu/bin/x86_64-linux-gnu-ar).

Maybe that line could be changed to

sed -e 's| ar | @AR@ |g' \

Cross-compiling issue

I'm currently on Ubuntu x86_64 trying to cross-compile for aarch64.
The configuration stage works as expected by running ./configure --host=aarch64-none-linux-gnu

However it fails during the make stages. Reason being (I think) that it's compiling a file for aarch64 and then attempting to run it.

$ make
  CC       solvers/arithchk-arithchk.o
  CC       arithchk-fpinit.o
  CCLD     arithchk
./arithchk > arith.h
/bin/sh: ./arithchk: cannot execute binary file: Exec format error
make: *** [Makefile:1351: arith.h] Error 126

I'm trying to get around this as the program seems to just output a few lines.

More output

Not sure if this is of any use, but here's the output from the other command

./configure --host=aarch64-none-linux-gnu
checking build system type... x86_64-pc-linux-gnu
checking host system type... aarch64-none-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-none-linux-gnu-strip... aarch64-none-linux-gnu-strip
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for aarch64-none-linux-gnu-gcc... aarch64-none-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether aarch64-none-linux-gnu-gcc accepts -g... yes
checking for aarch64-none-linux-gnu-gcc option to enable C11 features... none needed
checking whether aarch64-none-linux-gnu-gcc understands -c and -o together... yes
checking dependency style of aarch64-none-linux-gnu-gcc... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by aarch64-none-linux-gnu-gcc... /home/a415278/armcross/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/bin/ld
checking if the linker (/home/a415278/armcross/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/a415278/armcross/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-nm -B
checking the name lister (/home/a415278/armcross/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to aarch64-none-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/a415278/armcross/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/bin/ld option to reload object files... -r
checking for aarch64-none-linux-gnu-objdump... aarch64-none-linux-gnu-objdump
checking how to recognize dependent libraries... pass_all
checking for aarch64-none-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for aarch64-none-linux-gnu-ar... aarch64-none-linux-gnu-ar
checking for archiver @FILE support... @
checking for aarch64-none-linux-gnu-strip... (cached) aarch64-none-linux-gnu-strip
checking for aarch64-none-linux-gnu-ranlib... aarch64-none-linux-gnu-ranlib
checking command to parse /home/a415278/armcross/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-nm -B output from aarch64-none-linux-gnu-gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for aarch64-none-linux-gnu-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for aarch64-none-linux-gnu-ar... (cached) aarch64-none-linux-gnu-ar
checking the archiver (aarch64-none-linux-gnu-ar) interface... ar
checking for objdir... .libs
checking if aarch64-none-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for aarch64-none-linux-gnu-gcc option to produce PIC... -fPIC -DPIC
checking if aarch64-none-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes
checking if aarch64-none-linux-gnu-gcc static flag -static works... yes
checking if aarch64-none-linux-gnu-gcc supports -c -o file.o... yes
checking if aarch64-none-linux-gnu-gcc supports -c -o file.o... (cached) yes
checking whether the aarch64-none-linux-gnu-gcc linker (/home/a415278/armcross/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: libtool version info: -version-number 2:0:0
checking for getrusage... yes
checking for long long... yes
checking for ssize_t... yes
checking for dlopen in -ldl... yes
checking for library containing cos... -lm
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating coinasl.pc
config.status: linking solvers/stdio1.h0 to stdio1.h
config.status: linking solvers/fpinit.c to fpinit.c
config.status: executing depfiles commands
config.status: executing libtool commands
configure: Configuration of ThirdPartyASL successful

Update to ASL

I just uploaded an updated ASL library based on a snapshot of the code here that was taken today. This is to fix failures that were occurring on Appveyor because the compiler itself was crashing when trying to build ASL (see, e.g., here). Apparently this was noticed and fixed recently (see, e.g., ampl/asl@5fe8141). I modified get.ASL in master to retrieve the new version. Questions:

  • Since this is essentially a bug-fix release of ASL, I think we could just make a new release of current ThirdParty/ASL in order to propogate this out to stable/2.10 builds, where this is an issue.
  • Should we note the SHA in the file name rather than the date, now that there is a git repository?

@svigerske what do you think?

The 'filename' macro conflicts with STL

When I tried to enable ASL in couenne it failed to build:

In file included from ../readnl/readnl.cpp:21:
In file included from /usr/local/include/coin/CoinTime.hpp:182:
In file included from /usr/include/c++/v1/fstream:188:
/usr/include/c++/v1/filesystem:1066:34: error: field has incomplete type 'std::__1::__fs::filesystem::path'
  _LIBCPP_INLINE_VISIBILITY path filename() const {
                                 ^
/usr/local/include/coin/ThirdParty/asl.h:698:18: note: expanded from macro 'filename'
#define filename        asl->i.filename_
                        ^
/usr/include/c++/v1/filesystem:738:24: note: definition of 'std::__1::__fs::filesystem::path' is not complete until the closing '}'
class _LIBCPP_TYPE_VIS path {
                       ^

Apparently filename defined in /usr/local/include/coin/CoinTime.hpp:182 conflicts with the STL's finename function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.