YosysHQ / arachne-pnr

Place and route tool for FPGAs
MIT License
413 stars 72 forks source link

Added autotools to build process #40

Closed jhol closed 6 years ago

jhol commented 8 years ago

This patch replaces the previous Makefile-based build system with one based on autotools.

cseed commented 8 years ago

@jhol Awesome, thanks for the patch! I should have time to look it over this weekend.

jhol commented 8 years ago

@cseed yeah it looks like some travis fixes need folding in, and maybe some replacement for the removed features. If you do want to wait for replacements for the removed features, I don't mind, but I would like some input on how you would like these to work.

cseed commented 8 years ago

This is great! A few things:

../configure: line 3702: AX_CXX_COMPILE_STDCXX_11: command not found

I'm using autoconf 2.69. In spite of this, I can proceed.

diff --git a/Makefile.am b/Makefile.am
index d461e5d..ca7a7f9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,12 +48,12 @@ arachne_pnr_data_DATA = \
        share/arachne-pnr/chipdb-1k.bin \
        share/arachne-pnr/chipdb-8k.bin

-share/arachne-pnr/chipdb-1k.bin: arachne-pnr $(ICEBOX_DIR)/chipdb-1k.txt
+share/arachne-pnr/chipdb-1k.bin: bin/arachne-pnr $(ICEBOX_DIR)/chipdb-1k.txt
        @$(MKDIR_P) share/arachne-pnr
        $(AM_V_GEN)./bin/arachne-pnr -q -d 1k -c $(ICEBOX_DIR)/chipdb-1k.txt \
                --write-binary-chipdb share/arachne-pnr/chipdb-1k.bin

-share/arachne-pnr/chipdb-8k.bin: arachne-pnr $(ICEBOX_DIR)/chipdb-8k.txt
+share/arachne-pnr/chipdb-8k.bin: bin/arachne-pnr $(ICEBOX_DIR)/chipdb-8k.txt
        @$(MKDIR_P) -p share/arachne-pnr
        $(AM_V_GEN)./bin/arachne-pnr -q -d 8k -c $(ICEBOX_DIR)/chipdb-8k.txt \
                --write-binary-chipdb share/arachne-pnr/chipdb-8k.bin
$ make
...
g++ -I/Users/cotton/arachne-pnr/build/../src -std=c++11 -MD -Wall -Wshadow -Wsign-compare -Werror -g -O2   -o bin/test_us tests/test_us.o  
./bin/arachne-pnr -q -d 1k -c /usr/local/share/icebox/chipdb-1k.txt \
        --write-binary-chipdb share/arachne-pnr/chipdb-1k.bin
../autostuff/install-sh: invalid option: -p
make[1]: *** [share/arachne-pnr/chipdb-8k.bin] Error 1
make: *** [all] Error 2

I didn't look deeper.

https://docs.travis-ci.com/

I'm happy to help with that once I get things working locally if you prefer.

jhol commented 8 years ago

Thanks for the comments - I'll get this fixed up pretty soon.

jhol commented 8 years ago

@cseed I've now fixed all this issues you mentioned.

There's just one issue remaining with the Travis Linux builds. The build is failing because the Ubuntu 12.04 build host is too old to have the AutoConf AC_PACKAGE_VERSION macro, which seems have been released a little later than 2012.

Is there any scope for selecting a more up-to-date build VM? I'm not that familiar with what options Travis gives you.

The alternative is to make the build scripts compatible with Ubuntu 12.04, but that seems rather pointless for such an old distro with a brand-new project.

The Mac build works fine.

karlp commented 8 years ago

Why can't autotools be made to work on a still supported LTS system? isn't autotools all about handling system differences like this?

jhol commented 8 years ago

@karlp Well it certainly could be - at the sacrifice of the availability of the macro AC_PREREQ which is used to ensure the AM_SILENT_RULES macro will be available.

Do you use 12.04 LTS? I thought people mostly stayed on that for production or coorporate deployments.

jhol commented 8 years ago

@cseed did you get a chance to have another look at this yet?

cliffordwolf commented 6 years ago

This is now over a year old, has conflicts with current master, and I think @cseed will not ever look at it, so I'm now closing the issue.

jhol commented 6 years ago

@cliffordwolf is this worth resurrecting? I added autotools to make the code more portable.

cliffordwolf commented 6 years ago

is this worth resurrecting?

I don't think so. I'm not the right person to review such a change (I'm not really a fan of autotools for my own projects tbh), and it doesn't seem like cseed has the time to look into any arachne-pnr related issues.