Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
> Are you sure you need to comment out ANALYZE_OPTS and STD_GHDL_FLAGS ? > Usually, Makefile variables set on the command line overrides the > definitions. I wasn't aware of this subtelty... it seems so wrong to me... But anyway, indeed the "instructions" that set these variables inside the Makefile are kind of skipped. I'll have to read some docs on that topic. So no need to patch the Makefile. I did a fast try on an unclean build directory (and with GHDL installed on my machine...) and it seems this command works fine: make \ GHDL="${srcdir}/gcc-build/gcc/ghdl" \ ANALYZE_OPTS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \ STD_GHDL_FLAGS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \ ghdllib So no need to split build of libraries and of runtime... I'll rebuild with no ghdl installed and with clean build directory, but tomorrow I think. Regards, Adrien ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
On 27/11/16 22:57, Adrien Prost-Boucle wrote: Hi, I have found a way to compile the VHDL libraries without first installing GHDL in the system. The warnings are still there but it seems to work. Overall I think what I needed could be enabled with rather generic modifications to the ghdl Makefile. Here are my build steps in hope it's useful. Thank you for the instructions. 1) Compile gcc with normal make in the gcc build dir 2) Patch the Makefile in the ghdl source directory (see attached patch) 3) Build libraries with that command: make \ GHDL="${srcdir}/gcc-build/gcc/ghdl" \ ANALYZE_OPTS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \ STD_GHDL_FLAGS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \ vhdl.libs.all libs.vhdl.standard 4) Built grt: make libgrt.a 5) Install gcc and libraries as described in file BUILD.txt So I patch the Makefile to be able to manually set the variables ANALYZE_OPTS and STD_GHDL_FLAGS from my build script. And I have to split the original command "make ghdllib" into the steps 3) and 4) because otherwise the path the GHDL is overwritten. Are you sure you need to comment out ANALYZE_OPTS and STD_GHDL_FLAGS ? Usually, Makefile variables set on the command line overrides the definitions. Maybe I should change the BUILD.txt ? Tristan. ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
Hi, I have found a way to compile the VHDL libraries without first installing GHDL in the system. The warnings are still there but it seems to work. Overall I think what I needed could be enabled with rather generic modifications to the ghdl Makefile. Here are my build steps in hope it's useful. 1) Compile gcc with normal make in the gcc build dir 2) Patch the Makefile in the ghdl source directory (see attached patch) 3) Build libraries with that command: make \ GHDL="${srcdir}/gcc-build/gcc/ghdl" \ ANALYZE_OPTS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \ STD_GHDL_FLAGS="--GHDL1=${srcdir}/gcc-build/gcc/ghdl1" \ vhdl.libs.all libs.vhdl.standard 4) Built grt: make libgrt.a 5) Install gcc and libraries as described in file BUILD.txt So I patch the Makefile to be able to manually set the variables ANALYZE_OPTS and STD_GHDL_FLAGS from my build script. And I have to split the original command "make ghdllib" into the steps 3) and 4) because otherwise the path the GHDL is overwritten. Regards, Adrien On Sat, 2016-11-19 at 22:41 +0100, Adrien Prost-Boucle wrote: > In the Makefile line 344 there > > ifeq "$(backend)" "gcc" > # ghdl with gcc backend is already installed, no need to specify ghdl1 > # (and we don't know where it is). > STD_GHDL_FLAGS= > else > ... > > I commented STD_GHDL_FLAGS= so I could manually set the path to ghdl1 from > command line > Then I launched > > make \ > GHDL=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl \ > > STD_GHDL_FLAGS=--GHDL1=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/ghdl1 > \ > libs.vhdl.all libs.vhdl.standard > > The target libs.vhdl.standard executes with no error, but for the target > libs.vhdl.all I still get the errors > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 > -P../std --work=ieee ../../src/ieee/std_logic_1164.v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library std does not exists for v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library ieee does not exists for v87 > ... > > So now I'm blocked, no other idea about what to try... > Any idea? > > Adrien --- Makefile +++ Makefile @@ -331,7 +331,7 @@ ANALYZE_DEP:=ghdl_$(backend)$(EXEEXT) GHDL=$(PWD)/$(ANALYZE_DEP) -ANALYZE_OPTS:= +#ANALYZE_OPTS:= ANALYZE:=$(GHDL) -a $(ANALYZE_OPTS) $(LIB_CFLAGS) # TODO?: don't include, make it separate @@ -341,7 +341,7 @@ ifeq "$(backend)" "gcc" # ghdl with gcc backend is already installed, no need to specify ghdl1 # (and we don't know where it is). - STD_GHDL_FLAGS= + #STD_GHDL_FLAGS= else # Specify ghdl1 path, as it is spawned by ghdl. STD_GHDL_FLAGS=--GHDL1=$(PWD)/ghdl1-$(backend)$(EXEEXT) ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
In the Makefile line 344 there ifeq "$(backend)" "gcc" # ghdl with gcc backend is already installed, no need to specify ghdl1 # (and we don't know where it is). STD_GHDL_FLAGS= else ... I commented STD_GHDL_FLAGS= so I could manually set the path to ghdl1 from command line Then I launched make \ GHDL=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl \ STD_GHDL_FLAGS=--GHDL1=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/ghdl1 \ libs.vhdl.all libs.vhdl.standard The target libs.vhdl.standard executes with no error, but for the target libs.vhdl.all I still get the errors /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 -P../std --work=ieee ../../src/ieee/std_logic_1164.v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library std does not exists for v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library ieee does not exists for v87 ... So now I'm blocked, no other idea about what to try... Any idea? Adrien On Sat, 2016-11-19 at 22:14 +0100, Adrien Prost-Boucle wrote: > Ah, I still had a ghdl version installed on my system and some errors were > hidden: > When just making the target libs.vhdl.standard I get this error: > > [adrien] > make > GHDL=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl > libs.vhdl.standard > cd lib/ghdl/v93/std; \ > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl > --bootstrap-standard --std=93 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl: installation > problem: lib/gcc/x86_64-unknown-linux-gnu/4.9.3/ghdl1 not found > make: *** [Makefile:351: lib/ghdl/v93/std/std_standard.o] Error 1 > > I'll find a workaround for that, force my GHDL path for this target, and > report the result. > > Adrien > > > On Sat, 2016-11-19 at 22:08 +0100, Adrien Prost-Boucle wrote: > > On Sat, 2016-11-19 at 17:53 +0100, Tristan Gingold wrote: > > > OTOH, ghdl is expected to be location neutral, so it could be > > > configured to be installed in one directory but really installed > > > in another. > > > > I thought so, so I did the ghdl fake-install with > > make DESTDIR="${pkgdir}" install > > and used the ghdl "installed" there to launch build of libs with > > make GHDL="${pkgdir}/usr/bin/ghdl" vhdl.libs.all libs.vhdl.standard > > (command line taken from inside Makefile, to set my own path to ghdl) > > > > And compilation of libs does launch, but I get these errors: > > > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 > > -P../std --work=ieee ../../src/ieee/std_logic_1164.v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > > library std does not exists for v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > > library ieee does not exists for v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 > > -P../std --work=ieee ../../src/ieee/std_logic_1164_body.v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > > library std does not exists for v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > > library ieee does not exists for v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 > > -P../std --work=ieee ../../src/ieee/numeric_bit.v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > > library std does not exists for v87 > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > > library ieee does not exists for v87 > > ... > > > > I don't understand the error and don't know how to solve it... > > > > Adrien > > > > > > ___ > > Ghdl-discuss mailing list > > Ghdl-discuss@gna.org > > https://mail.gna.org/listinfo/ghdl-discuss > > ___ > Ghdl-discuss mailing list > Ghdl-discuss@gna.org > https://mail.gna.org/listinfo/ghdl-discuss ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
Ah, I still had a ghdl version installed on my system and some errors were hidden: When just making the target libs.vhdl.standard I get this error: [adrien] > make GHDL=/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl libs.vhdl.standard cd lib/ghdl/v93/std; \ /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl --bootstrap-standard --std=93 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl: installation problem: lib/gcc/x86_64-unknown-linux-gnu/4.9.3/ghdl1 not found make: *** [Makefile:351: lib/ghdl/v93/std/std_standard.o] Error 1 I'll find a workaround for that, force my GHDL path for this target, and report the result. Adrien On Sat, 2016-11-19 at 22:08 +0100, Adrien Prost-Boucle wrote: > On Sat, 2016-11-19 at 17:53 +0100, Tristan Gingold wrote: > > OTOH, ghdl is expected to be location neutral, so it could be > > configured to be installed in one directory but really installed > > in another. > > I thought so, so I did the ghdl fake-install with > make DESTDIR="${pkgdir}" install > and used the ghdl "installed" there to launch build of libs with > make GHDL="${pkgdir}/usr/bin/ghdl" vhdl.libs.all libs.vhdl.standard > (command line taken from inside Makefile, to set my own path to ghdl) > > And compilation of libs does launch, but I get these errors: > > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 > -P../std --work=ieee ../../src/ieee/std_logic_1164.v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library std does not exists for v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library ieee does not exists for v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 > -P../std --work=ieee ../../src/ieee/std_logic_1164_body.v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library std does not exists for v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library ieee does not exists for v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 > -P../std --work=ieee ../../src/ieee/numeric_bit.v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library std does not exists for v87 > /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: > library ieee does not exists for v87 > ... > > I don't understand the error and don't know how to solve it... > > Adrien > > > ___ > Ghdl-discuss mailing list > Ghdl-discuss@gna.org > https://mail.gna.org/listinfo/ghdl-discuss ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
On Sat, 2016-11-19 at 17:53 +0100, Tristan Gingold wrote: > OTOH, ghdl is expected to be location neutral, so it could be > configured to be installed in one directory but really installed > in another. I thought so, so I did the ghdl fake-install with make DESTDIR="${pkgdir}" install and used the ghdl "installed" there to launch build of libs with make GHDL="${pkgdir}/usr/bin/ghdl" vhdl.libs.all libs.vhdl.standard (command line taken from inside Makefile, to set my own path to ghdl) And compilation of libs does launch, but I get these errors: /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 -P../std --work=ieee ../../src/ieee/std_logic_1164.v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library std does not exists for v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library ieee does not exists for v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 -P../std --work=ieee ../../src/ieee/std_logic_1164_body.v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library std does not exists for v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library ieee does not exists for v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl -a --std=87 -P../std --work=ieee ../../src/ieee/numeric_bit.v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library std does not exists for v87 /home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl:warning: library ieee does not exists for v87 ... I don't understand the error and don't know how to solve it... Adrien ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
On 19/11/16 15:15, Andrey Gursky wrote: [...] Actually using already compiled parts to generate something else during build is not uncommon. But in such cases Makefile uses executables in their build path, not installed one. Hopefully this could be fixed. And the other thing would be to add something like make copy-ghdllib-sources to build it out-of-tree also? BTW, is there any good reason to not build ghdllib in the gcc build directory? It is not easy to reuse the Makefile part for the libs as is. I think it could be possible to fix the Makefile, so that it is not necessary to install ghdl before building the libraries. OTOH, ghdl is expected to be location neutral, so it could be configured to be installed in one directory but really installed in another. Tristan. ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss
Re: [Ghdl-discuss] GCC flavour: Problem with compilation of VHDL libs
Hi, On Sat, 19 Nov 2016 11:37:57 +0100 Adrien Prost-Boucle wrote: > Hi, > > I'm maintaining the package ghdl-gcc-git for ArchLinux distribution > https://aur.archlinux.org/packages/ghdl-gcc-git/ > > The package builds gcc + VHDL libs in one package, which is very > convenient. However building the libraries is now done separately > according to the BUILD.txt file: > make ghhdlib > The problem is that when this command is run by the packaging script, > the GHDL executable is not yet installed in the filesystem and /usr/bin/ghdl > does not exist. > > Actually when doing make install from the gcc build directory, > the installed files are copied in another local directory, sort of a > fake root. I looked at the Makefile in the GHDL dir and tried that > command to compile the libs: > make GHDL="/home/adrien/Dev/AUR/ghdl-gcc-git/pkg/ghdl-gcc-git/usr/bin/ghdl" > vhdl.libs.all libs.vhdl.standard > That way the command uses the ghdl executable in the temp package dir, > but I get these errors: > warning: library std does not exists for v87 > warning: library ieee does not exists for v87 > > I wouldn't like splitting the package in 2, one with ghdl, which would > need to be built and installed first, and another that would just have > the libs. > > And I haven't found a way to compile the libs without first having > installed a version of ghdl with the std lib... > > Any advice on this? I have also stumbled over this issue: violating the good triple-rule: configure / make / make install. Building of ghdl is already more complex due to unpacking of gcc and calling make copy-sources (though this could be treated as bootstrap and maybe better renamed to bootstrap, while preserving comment "copy sources"?). The other thing is that ghdl was nicely built out-of-tree in the gcc build directory but now make ghdllib must be called in the ghdl source directory, which I'd like to avoid. Sorry, I haven't addressed this issue right on July/August. Actually using already compiled parts to generate something else during build is not uncommon. But in such cases Makefile uses executables in their build path, not installed one. Hopefully this could be fixed. And the other thing would be to add something like make copy-ghdllib-sources to build it out-of-tree also? BTW, is there any good reason to not build ghdllib in the gcc build directory? Thanks, Andrey ___ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss