Modify

Opened 9 years ago

Closed 8 years ago

#2156 closed defect (fixed)

OpenWRT does not build on Mac OS X

Reported by: danchr@… Owned by: developers
Priority: low Milestone:
Component: base system Version:
Keywords: Cc: danchr@…

Description

I'm trying to get OpenWRT to build on Mac OS X, and so far, it hasn't been all that hard. I've ran into plenty of issues, but nothing that wasn't fixable.

The first issue was that OpenWRT does not build with the GNU Make 3.80 used in Mac OS X 10.4 Tiger, so I installed 3.81 from MacPorts.

Then, there where plenty of minor issues with the build system, and in particular with md5sum not being available, or being available as gmd5sum.

Now I'm running into an issue with the default user process limit of 100 being too low, and increasing it to 250 doesn't solve it. It appears to be something wrong with GNU libtool.

Attached below are my changes so far.

Attachments (5)

openwrt-mac.diff (3.8 KB) - added by danchr@… 9 years ago.
openwrt-mac.diff
openwrt-darwin.diff (7.7 KB) - added by danchr@… 9 years ago.
openwrt-mac.diff
openwrt-darwin-v2.diff (10.1 KB) - added by danchr@… 9 years ago.
Improved patch, getting ready for inclusion into trunk.
openwrt-darwin-v2.2.diff (10.1 KB) - added by danchr@… 9 years ago.
Improved patch, getting ready for inclusion into trunk.
openwrt-darwin-v3.diff (11.2 KB) - added by danchr@… 9 years ago.
Yet improved patch. Bootstrapping now.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by danchr@…

openwrt-mac.diff

comment:1 Changed 9 years ago by danchr@…

Now, I'm getting a rather odd error from bootstrapping GCC:

/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/gcc/xgcc -shared-libgcc -B/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/gcc/ -nostdinc++ -L/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/src -L/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/src/.libs -B/Volumes/Backup/buildroot/staging_dir_mipsel/mipsel-linux-uclibc/bin/ -B/Volumes/Backup/buildroot/staging_dir_mipsel/mipsel-linux-uclibc/lib/ -isystem /Volumes/Backup/buildroot/staging_dir_mipsel/mipsel-linux-uclibc/include -isystem /Volumes/Backup/buildroot/staging_dir_mipsel/mipsel-linux-uclibc/sys-include -I/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/include/mipsel-linux-uclibc -I/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/include -I/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6/libstdc++-v3/libsupc++ -g -Os -g -Os -fno-implicit-templates -Wall -W -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c /Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6/libstdc++-v3/src/allocator.cc  -fPIC -DPIC
In file included from /Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/include/iosfwd:46,
                 from /Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/include/bits/stl_algobase.h:70,
                 from /Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/include/memory:54,
                 from /Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6/libstdc++-v3/src/allocator.cc:35:
/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/include/mipsel-linux-uclibc/bits/c++locale.h: In function `int std::__convert_from_v(char*, int, const char*, _Tv, int* const&, int)':
/Volumes/Backup/buildroot/toolchain_build_mipsel/gcc-3.4.6-final/mipsel-linux-uclibc/libstdc++-v3/include/mipsel-linux-uclibc/bits/c++locale.h:103: error: `snprintf' is not a member of `std'

I'm inclined to simply “fix” this by upgrading to GCC 4.1 or 4.2. It just might be that this old GCC release is buggy on this platform.

comment:2 Changed 9 years ago by anonymous

mac os x comes with 'md5' not 'gmd5sum'

Changed 9 years ago by danchr@…

openwrt-mac.diff

comment:3 Changed 9 years ago by danchr@…

The previous patch is an updated, and much more complicated, attempt. It uses Apple GCC 3.3 to build GCC 3.4, since Apple GCC 4.0 for some reason can't. One implication of this is that for 2.4 kernels, the SDK will be PowerPC-only. But emulated PowerPC on a Core is probably faster than my eMac, so who cares ;)

Changed 9 years ago by danchr@…

Improved patch, getting ready for inclusion into trunk.

Changed 9 years ago by danchr@…

Improved patch, getting ready for inclusion into trunk.

comment:4 Changed 9 years ago by danchr@…

Sorry 'bout the spam, but the duplicate patch was due to the server reporting a 501 Internal Error, so I retried, but apparently, it had already succeeded :-/

Changed 9 years ago by danchr@…

Yet improved patch. Bootstrapping now.

comment:5 Changed 8 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Openwrt now builds fine on OSX. Please re-open if there are some left-over issues.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.