Since no one has responded, I will tell you what I know, hopefully you've
solved it or someone else will chime in. Tup builds itself, so the first
step is bootstrapping the necessary state for tup to run, and then running
that shimmed version to generate the full version of tup. Tup won't
overwrite files that you've created outside of tup, so tup is looking at
the command ': foreach $(srcs) |> !cc -DLUA_USE_POSIX |> {objs}' and seeing
that it would create lapi.o, but that file already exists so it can't
proceed. I can see two possible sources for this problem. 1) In your
configuring tup to work without gcc you accidentally compiled lapi.o. All
you need to do is delete that file and rerun build and you should be good.
2) The way you've tweaked the build changed something about the way the
bootstrapping tracks files and as a result this is popping up. I don't
really know how the bootstrapping works, so I can't really comment as to
how this change would affect it, but you can look through the compilation
script files to see if something jumps out.

On Fri, Jul 21, 2017 at 1:42 PM Chuck Tuffli <[email protected]> wrote:

> I'm trying to build the latest tup from git on a FreeBSD 12.0 system
> (well, TrueOS), but keep running into errors such as:
>
> .tup repository initialized.
> .tup repository initialized.
> Scanning...
> Reading tup.config...
> Parsing...
> ...
>   72% src/tup/flock
>   75% src/tup/monitor
>   79% src/tup/tup
> *  82% src/lua
> tup error: Attempting to insert 'lapi.o' as a generated node when it
> already exists as a different type (normal file). You can do one of two
> things to fix this:
>   1) If this file is really supposed to be created from the command,
> delete the file from the filesystem and try again.
>   2) Change your rule in the Tupfile so you aren't trying to overwrite the
> file.
> tup error: Error parsing Tupfile line 39
>   Line was: ': foreach $(srcs) |> !cc -DLUA_USE_POSIX |> {objs}'
>
> What is this error trying to tell me?
>
> Note that the system does not have gcc installed, so I did make a couple
> of slight changes to the build. The second change is probably right, but
> there's probably a better solution for the first change:
> > git diff
> diff --git a/Tuprules.tup b/Tuprules.tup
> index 4aaf189a..8c02f50e 100644
> --- a/Tuprules.tup
> +++ b/Tuprules.tup
> @@ -1,6 +1,10 @@
>  .gitignore
>
> +ifneq (@(TUP_PLATFORM),freebsd)
>  CC = gcc
> +else
> +CC = clang
> +endif
>
>  ifeq (@(TUP_DEBUG),y)
>  CFLAGS += -g
> diff --git a/build.sh b/build.sh
> index 15a4b4ea..0f37f1e5 100755
> --- a/build.sh
> +++ b/build.sh
> @@ -43,6 +43,8 @@ case "$os" in
>         plat_files="$plat_files ../src/compat/dummy.c"
>         plat_files="$plat_files ../src/compat/utimensat_linux.c"
>         plat_files="$plat_files ../src/compat/clearenv.c"
> +       plat_cflags="$plat_cflags -include ../src/compat/freebsd.h"
> +       CC=clang
>         ;;
>  esac
>
> --chuck
>
> --
> --
> tup-users mailing list
> email: [email protected]
> unsubscribe: [email protected]
> options: http://groups.google.com/group/tup-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "tup-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to