Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error at wmake on FreeBSD #666

Closed
yamori813 opened this issue Feb 27, 2021 · 6 comments
Closed

Build error at wmake on FreeBSD #666

yamori813 opened this issue Feb 27, 2021 · 6 comments

Comments

@yamori813
Copy link
Contributor

Hi

I build OW on FreeBSD/i386 12.2R.

I have build error on wmake. I seem bld/wmake/postmake is not compatible BSD make.

% ./build.sh
Open Watcom build environment (CLANG version=10, CYEAR=2021)
cc -g -O2 -I. -I../h -I../../watcom/h -I../../lib_misc/h -D__BSD__ -D__UNIX__ -DBOOTSTRAP -D_BLDVER=1300 -D_CYEAR=2021 -c ../../builder/c/wsplice.c
cc -g -O2 -I. -I../h -I../../watcom/h -I../../lib_misc/h -D__BSD__ -D__UNIX__ -DBOOTSTRAP -D_BLDVER=1300 -D_CYEAR=2021 -c ../../watcom/c/clibext.c
cc -g wsplice.o clibext.o -o wsplice.exe
./wsplice.exe -kENGLISH -f 'pick((MSG_USAGE_BASE+%#%+), "%s", "")' ../h/usage.sp usage.gh
cc -I../../watcom/h -o cretype.exe
cc: error: no input files
*** Error code 1

Stop.
make: stopped in /usr/home/hiroki/ow/ow2/bld/wmake/binbuild
wmake bootstrap build error

@jmalak
Copy link
Member

jmalak commented Feb 27, 2021

It is strange.
Please could you get more verbosed output from make on freeBSD?
It should be command line option like "-d A"
It looks like problem with $< macro that is blank for some reason to build cretype.exe.

@jmalak
Copy link
Member

jmalak commented Feb 27, 2021

It seems I find out source of problem.
It looks like $< macro is defined only for implicit rules.
I replace it by $? even if it is not the same, but for our make file with only 1 dependent it works properly (it contains all dependents = only source file).
Please check it on FreeBSD.

@yamori813
Copy link
Contributor Author

This is work fine. But I don't know why. I don't detailed Makefile macro. sorry.

--- a/bld/wmake/posmake
+++ b/bld/wmake/posmake
@@ -81,7 +81,7 @@ usage.gh : ../h/usage.sp wsplice.exe
        ./wsplice.exe -kENGLISH -f 'pick((MSG_USAGE_BASE+%#%+), "%s", "")' ../h/usage.sp $@
 
 cretype.exe : ../c/cretype.c
-       $(CC) -I../../watcom/h -o $@ $<
+       $(CC) -I../../watcom/h -o $@ ../c/cretype.c
 
 isarray.gh : cretype.exe
        ./cretype.exe $@

@jmalak
Copy link
Member

jmalak commented Feb 27, 2021

It looks like freeBSD make is not fully POSIX compliant.
Now wmake build make file uses POSIX construct working with freeBSD make.
It should be working in the future when freeBSD will be fully POSIX compliant.

@jmalak jmalak closed this as completed Feb 27, 2021
@jmalak jmalak reopened this Aug 12, 2021
jmalak added a commit that referenced this issue Aug 12, 2021
@jmalak
Copy link
Member

jmalak commented Aug 12, 2021

I add .POSIX directive which is required by POSIX standard.
I don't know if this fix your problem.

jmalak added a commit that referenced this issue Aug 13, 2021
correct mistake in posmake make file
add _POSIX_C_SOURCE=200112L macro for compilation
@jmalak
Copy link
Member

jmalak commented Aug 13, 2021

I rework the wmake code a little bit to use POSIX setenv instead of putenv, commit 54a05bd .
I also set POSIX compliance version 200112L and setup make file to use POSIX standard by directive .POSIX:.
Please, check if a problems continue or if it is fixed.

@jmalak jmalak closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants