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

Compilation fails on Mac OS #50

Closed
FTurci opened this issue Mar 29, 2018 · 6 comments
Closed

Compilation fails on Mac OS #50

FTurci opened this issue Mar 29, 2018 · 6 comments
Assignees
Labels
bug Something isn't working critical Top priority issue mac Mac OS X platform specific issue

Comments

@FTurci
Copy link
Contributor

FTurci commented Mar 29, 2018

The latest development version does not compile on the Mac. The problem is that Mac OS is not contemplated in the make_directory function.

Here is the error during make

/Users/ft14968/Documents/GitHub/TCC/tcc/src/tools.c: In function 'make_directory':
/Users/ft14968/Documents/GitHub/TCC/tcc/src/tools.c:105:12: warning: implicit declaration of function '_mkdir' [-Wimplicit-function-declaration]
         if(_mkdir(name) != 0) {
            ^~~~~~
[ 97%] Building C object tcc/src/CMakeFiles/tcc.dir/voronoi_bonds.c.o
[100%] Linking C executable ../../../bin/tcc
Undefined symbols for architecture x86_64:
  "__mkdir", referenced from:
      _make_directory in tools.c.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/tcc] Error 1
make[1]: *** [tcc/src/CMakeFiles/tcc.dir/all] Error 2
make: *** [all] Error 2
@FTurci FTurci added bug Something isn't working critical Top priority issue labels Mar 29, 2018
@merrygoat
Copy link
Contributor

Oops, I forgot Apple was a thing. Commit 2a6414d should hopefully resolve this but I don't have an Apple to test directly.

@tranqui
Copy link

tranqui commented Apr 6, 2018

The integration test in test/TCC/tcc_test.py should have an option to build on mac too. The steps should be the same as for linux, so perhaps only ine 30 need be changed:
elif system() == "Linux":
to include an additional conditional for Mac OS X?

@tranqui
Copy link

tranqui commented Apr 6, 2018

Made change in commit c48a20e. Building should work now on Mac OS X

@tranqui
Copy link

tranqui commented Apr 6, 2018

Build seems to work successfully now on @FTurci's machine, but the other tests fail. The resulting executable does not seem to work correctly; it appears it may be due to the tcc running in the wrong directory.

@merrygoat
Copy link
Contributor

Can we just abandon support for OSX based on the fact that macs are expensive fashion icons for arty people and aren't used by anyone serious?

@FTurci
Copy link
Contributor Author

FTurci commented Apr 6, 2018

Compilation works. The latest development version simply has another bug related to the output (too many NAs...).

Other remark: "make" should be followed by "make install" and we should not have plenty of executables copied everywhere. "cmake" has also a prefix option. This was a source of confusion when we tried to identify the issue.

Finally, there are many more Mac users than Windows users in the group.

@FTurci FTurci closed this as completed Apr 6, 2018
@tranqui tranqui added the mac Mac OS X platform specific issue label Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical Top priority issue mac Mac OS X platform specific issue
Projects
None yet
Development

No branches or pull requests

4 participants