wangqr / Aegisub

Win64 nightly builds available at GHA artifact, also at following link:
https://ftp.wangqr.tk/aegisub/
Other
799 stars 49 forks source link

macOS building error #52

Closed morning-paradigm closed 4 years ago

morning-paradigm commented 4 years ago

I've made sure to follow the Special notice for macOS and tried to build the program, but got a bunch of errors. make output log.txt

wangqr commented 4 years ago
../list:3:1: error: unknown type name 'ls'
ls
^

Looks like there is a file named list somewhere in the source directory, and contains ls as its content. The compiler included that file instead of <list> in C++ STL and causing errors. You may want to check git status or just search for that file.

morning-paradigm commented 4 years ago

There's list.c in Aegisub⁩ ▸ ⁨vendor⁩ ▸ ⁨csri⁩ ▸ ⁨lib⁩. It's identical to the one on GitHub. What about it?

git status
On branch dev
Your branch is up to date with 'origin/dev'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ABOUT-NLS
        config.rpath
        m4/
        po/Makefile.in.in
        po/Makevars.template
        po/Rules-quot
        po/boldquot.sed
        po/en@boldquot.header
        po/en@quot.header
        po/insert-header.sin
        po/quot.sed
        po/remove-potcdate.sin

nothing added to commit but untracked files present (use "git add" to track)
wangqr commented 4 years ago

Is there a list located in /Users/alpin/Downloads/?

morning-paradigm commented 4 years ago

Yes, it contains ls as you said.

wangqr commented 4 years ago

So if you move / rename that file, it should workaround this issue.

morning-paradigm commented 4 years ago

Yeah, I've managed to build it after removing the file. The app size is slightly different from the r9139 build you provided, but it works.

I've got two more questions:

  1. Setting environment variables during build works temporary and force linking them is permanent, right?
  2. make utilised only one core. Is there any way to make it use more than one to quicken the build process?
wangqr commented 4 years ago
  1. Setting environment variables during build works temporary. Unless you put those lines in your ~/.zshrc, they are gone once you close the terminal, and you need to set it again for a new terminal window. Force link tells homebrew to install them and override macOS-provided ones. Force linking is not recommended. It should be able to undone according to https://stackoverflow.com/a/26615940/3342190 .
  2. make can be parallelized with -j. For example make -j8 will use 8 cores.

The app size is slightly different from the r9139 build you provided, but it works.

Reproducible build is a long term target, but currently there are still many things to do. For example wxLogError uses __FILE__, and will include the source directory information in the final binary.