Hi,
Am I the only one seeing this? The last few days, I'm not able to get
the stage3 compiler to build. This is on Ubuntu 22.10. The build log
shows:
[ 97%] Built target zigstage1
[ 98%] Building CXX object CMakeFiles/zig1.dir/src/stage1/zig0.cpp.o
[ 98%] Linking CXX executable zig1
[ 98%] Built target zig1
[ 99%] Building stage2 object /home/rganesan/git/zig/build/zig2.o
[ 99%] Building CXX object CMakeFiles/zig2.dir/src/stage1/empty.cpp.o
[100%] Linking CXX executable zig2
[100%] Built target zig2
[100%] Building stage3
[100%] Built target stage3
Notice there's no Linking message for stage3 and I don't see the
stage3 binary in the build directory. I suspect something weird is
going on with cmake, I thought I'll check before I dig further.
Ganesan
--
Ganesan Rajagopal
Hey,
this is actually intended behavior, stage3 is compiled by stage 2 zig,
which deals with linking, hence why it doesn't show up in the logs.
Because Zig builds the stage 3 binary, it deals with building and
installing and since Zig doesn't put a binary somewhere without
"installing" it this requires you to invoke `make install`.
By default this should put the stage 3 binary into /path/to/zig/stage3,
but can be changed by setting CMAKE_INSTALL_PREFIX.
If for whatever reason you cannot change CMAKE_INSTALL_PREFIX, set the
env var DESTDIR to a local path and run make install.
Hope this helps.
Jan
On 12/1/22 18:26, Ganesan Rajagopal wrote:
> Hi,> > Am I the only one seeing this? The last few days, I'm not able to get> the stage3 compiler to build. This is on Ubuntu 22.10. The build log> shows:> > [ 97%] Built target zigstage1> [ 98%] Building CXX object CMakeFiles/zig1.dir/src/stage1/zig0.cpp.o> [ 98%] Linking CXX executable zig1> [ 98%] Built target zig1> [ 99%] Building stage2 object /home/rganesan/git/zig/build/zig2.o> [ 99%] Building CXX object CMakeFiles/zig2.dir/src/stage1/empty.cpp.o> [100%] Linking CXX executable zig2> [100%] Built target zig2> [100%] Building stage3> [100%] Built target stage3> > Notice there's no Linking message for stage3 and I don't see the> stage3 binary in the build directory. I suspect something weird is> going on with cmake, I thought I'll check before I dig further.> > Ganesan>
On Fri, Dec 2, 2022 at 2:25 AM Jan Drögehoff <sentrycraft123@gmail.com> wrote:
>> Hey,>> this is actually intended behavior, stage3 is compiled by stage 2 zig,> which deals with linking, hence why it doesn't show up in the logs.>> Because Zig builds the stage 3 binary, it deals with building and> installing and since Zig doesn't put a binary somewhere without> "installing" it this requires you to invoke `make install`.>> By default this should put the stage 3 binary into /path/to/zig/stage3,> but can be changed by setting CMAKE_INSTALL_PREFIX.>> If for whatever reason you cannot change CMAKE_INSTALL_PREFIX, set the> env var DESTDIR to a local path and run make install.>> Hope this helps.> Jan
Oh, thank you. That was very helpful. I even tried "make -n install" to see what
it installs and weirdly it doesn't show installing the binary :-).
Ganesan
>> On 12/1/22 18:26, Ganesan Rajagopal wrote:> > Hi,> >> > Am I the only one seeing this? The last few days, I'm not able to get> > the stage3 compiler to build. This is on Ubuntu 22.10. The build log> > shows:> >> > [ 97%] Built target zigstage1> > [ 98%] Building CXX object CMakeFiles/zig1.dir/src/stage1/zig0.cpp.o> > [ 98%] Linking CXX executable zig1> > [ 98%] Built target zig1> > [ 99%] Building stage2 object /home/rganesan/git/zig/build/zig2.o> > [ 99%] Building CXX object CMakeFiles/zig2.dir/src/stage1/empty.cpp.o> > [100%] Linking CXX executable zig2> > [100%] Built target zig2> > [100%] Building stage3> > [100%] Built target stage3> >> > Notice there's no Linking message for stage3 and I don't see the> > stage3 binary in the build directory. I suspect something weird is> > going on with cmake, I thought I'll check before I dig further.> >> > Ganesan> >
--
Ganesan Rajagopal