Reply 20 of 44, by emendelson
wrote:when you type export, what is the PATH setting?
Here it is:
declare -x PATH="/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin"
wrote:when you type export, what is the PATH setting?
Here it is:
declare -x PATH="/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin"
hmm, same here, that would have been too easy...
So please try with a fresh SVN
OK, using a completely fresh download of the current SVN, I've done this:
export CFLAGS='-I/opt/local/include -O2 -arch i386' export CPPFLAGS=$CXXFLAGS export CXXFLAGS='-O2 -mdynamic-no-pic -arch i38 […]
export CFLAGS='-I/opt/local/include -O2 -arch i386'
export CPPFLAGS=$CXXFLAGS
export CXXFLAGS='-O2 -mdynamic-no-pic -arch i386'
export MACOSX_DEPLOYMENT_TARGET='10.6'
export CXX='/usr/bin/g++-4.2 -arch i386'
export F90FLAGS='-O2 -m32'
export LDFLAGS='-L/opt/local/lib -O2 -arch i386'
export OBJC='/usr/bin/gcc-4.2 -arch i386'
export FCFLAGS='-O2 -m32'
export INSTALL='/usr/bin/install -c'
export OBJCFLAGS='-O2 -arch i386'
export FFLAGS='-O2 -m32'
export CC='/usr/bin/gcc-4.2 -arch i386'
export GCOV='/usr/bin/gcov-4.2 -arch i386'
then:
./autogen.sh
./configure
Next, I tried make without modifying the makefile (in other words, no sed commands), with the same errors as before:
make[4]: *** [hardware.o] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-re […]
make[4]: *** [hardware.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
And the errors still seem to be involved with png - here are the last few lines of the output before the errors shown above:
hardware.cpp:34:17: error: png.h: No such file or directory hardware.cpp: In function ‘void CAPTURE_AddImage(Bitu, Bitu, Bitu, B […]
hardware.cpp:34:17: error: png.h: No such file or directory
hardware.cpp: In function ‘void CAPTURE_AddImage(Bitu, Bitu, Bitu, Bitu, Bitu, float, Bit8u*, Bit8u*)’:
hardware.cpp:318: error: ‘png_structp’ was not declared in this scope
hardware.cpp:318: error: expected `;' before ‘png_ptr’
hardware.cpp:319: error: ‘png_infop’ was not declared in this scope
hardware.cpp:319: error: expected `;' before ‘info_ptr’
hardware.cpp:320: error: ‘png_color’ was not declared in this scope
hardware.cpp:320: error: expected `;' before ‘palette’
hardware.cpp:327: error: ‘png_ptr’ was not declared in this scope
hardware.cpp:327: error: ‘PNG_LIBPNG_VER_STRING’ was not declared in this scope
hardware.cpp:327: error: ‘png_create_write_struct’ was not declared in this scope
hardware.cpp:329: error: ‘info_ptr’ was not declared in this scope
hardware.cpp:329: error: ‘png_create_info_struct’ was not declared in this scope
hardware.cpp:331: error: ‘png_infopp’ was not declared in this scope
hardware.cpp:331: error: ‘png_destroy_write_struct’ was not declared in this scope
hardware.cpp:336: error: ‘png_init_io’ was not declared in this scope
hardware.cpp:337: error: ‘png_set_compression_level’ was not declared in this scope
hardware.cpp:340: error: ‘png_set_compression_mem_level’ was not declared in this scope
hardware.cpp:341: error: ‘png_set_compression_strategy’ was not declared in this scope
hardware.cpp:342: error: ‘png_set_compression_window_bits’ was not declared in this scope
hardware.cpp:343: error: ‘png_set_compression_method’ was not declared in this scope
hardware.cpp:344: error: ‘png_set_compression_buffer_size’ was not declared in this scope
hardware.cpp:348: error: ‘PNG_COLOR_TYPE_PALETTE’ was not declared in this scope
hardware.cpp:348: error: ‘PNG_INTERLACE_NONE’ was not declared in this scope
hardware.cpp:349: error: ‘PNG_COMPRESSION_TYPE_DEFAULT’ was not declared in this scope
hardware.cpp:349: error: ‘PNG_FILTER_TYPE_DEFAULT’ was not declared in this scope
hardware.cpp:349: error: ‘png_set_IHDR’ was not declared in this scope
hardware.cpp:351: error: ‘palette’ was not declared in this scope
hardware.cpp:355: error: ‘palette’ was not declared in this scope
hardware.cpp:355: error: ‘png_set_PLTE’ was not declared in this scope
hardware.cpp:357: error: ‘png_set_bgr’ was not declared in this scope
hardware.cpp:359: error: ‘PNG_COLOR_TYPE_RGB’ was not declared in this scope
hardware.cpp:359: error: ‘PNG_INTERLACE_NONE’ was not declared in this scope
hardware.cpp:360: error: ‘PNG_COMPRESSION_TYPE_DEFAULT’ was not declared in this scope
hardware.cpp:360: error: ‘PNG_FILTER_TYPE_DEFAULT’ was not declared in this scope
hardware.cpp:360: error: ‘png_set_IHDR’ was not declared in this scope
hardware.cpp:362: error: ‘png_write_info’ was not declared in this scope
hardware.cpp:433: error: ‘png_bytep’ was not declared in this scope
hardware.cpp:433: error: ‘png_write_row’ was not declared in this scope
hardware.cpp:436: error: ‘png_write_end’ was not declared in this scope
hardware.cpp:438: error: ‘png_destroy_write_struct’ was not declared in this scope
It doesn't find png.h - but I don't see why not.
Is there anything else I can post that might help sort this out?
in terminal, when you type libng-config, what's the output?
(btw. when you give make error messages it is important to include the command *before* the error and all errors before that - but don't bother now)
I fear you borked your system somehow. Current SVN does compile fine for me.
wrote:in terminal, when you type libng-config, what's the output?
...
I fear you borked your system somehow. Current SVN does compile fine for me.
When I enter "libpng-config" in the terminal, I simply get a "Usage..." message and a list of options. If it matters, when I type libpng-config --version it reports 1.4.7, which is the version I got from macports very recently.
I'm afraid you may be right about having borked my system. I've got a second (borrowed) machine running 10.6.7, which has the same problems. I can wipe out that system and start fresh if necessary, but of course I would have hoped to be able to use my main machine.
One difference between my system when I last compiled SVN and now is that I've been building libwpd (the WordPerfect document converter) and that required quite a few things from MacPorts. But I freshly installed the three things mentioned in my first post. If it's of any interest, here's the output of port installed:
MacBook24:trunk edward$ port installed The following ports are currently installed: autoconf @2.68_2 (active) automake @1.11 […]
MacBook24:trunk edward$ port installed
The following ports are currently installed:
autoconf @2.68_2 (active)
automake @1.11.1_0 (active)
bzip2 @1.0.6_0 (active)
cairo @1.10.2_3 (active)
db46 @4.6.21_6 (active)
dbus @1.2.24_1 (active)
doxygen @1.7.3_4 (active)
expat @2.0.1_1 (active)
fontconfig @2.8.0_0 (active)
freetype @2.4.4_0 (active)
gd2 @2.0.35_9 (active)
gdbm @1.8.3_3 (active)
gettext @0.18.1.1_2 (active)
ghostscript @9.02_0 (active)
glib2 @2.28.6_0 (active)
graphviz @2.26.3_7 (active)
groff @1.21_0 (active)
gts @0.7.6_1 (active)
help2man @1.39.2_0 (active)
jasper @1.900.1_7 (active)
jpeg @8c_0 (active)
libiconv @1.13.1_0 (active)
libidn @1.20_0 (active)
libpaper @1.1.24_0 (active)
libpixman @0.20.2_0 (active)
libpng @1.4.5_0+universal
libpng @1.4.7_0+universal (active)
libsdl @1.2.14_9+no_x11+universal (active)
libtool @2.4_0 (active)
libxml2 @2.7.8_0 (active)
m4 @1.4.16_0 (active)
ncurses @5.9_0 (active)
netpbm @10.47.26_0 (active)
openssl @1.0.0d_0 (active)
p5-locale-gettext @1.05_5 (active)
pango @1.28.4_0 (active)
perl5 @5.12.3_1+perl5_12 (active)
perl5.12 @5.12.3_1 (active)
pkgconfig @0.25_2+universal (active)
python27 @2.7.1_1 (active)
readline @6.2.000_0 (active)
sqlite3 @3.7.6_0 (active)
tiff @3.9.4_0 (active)
urw-fonts @1.0.7pre44_0 (active)
Xft2 @2.2.0_0 (active)
xorg-bigreqsproto @1.1.1_0 (active)
xorg-inputproto @2.0.1_0 (active)
xorg-kbproto @1.0.5_0 (active)
xorg-libice @1.0.7_0 (active)
xorg-libpthread-stubs @0.3_0 (active)
xorg-libsm @1.2.0_0 (active)
xorg-libX11 @1.4.3_0 (active)
xorg-libXau @1.0.6_0 (active)
xorg-libXaw @1.0.9_0 (active)
xorg-libxcb @1.7_0+python27 (active)
xorg-libXdmcp @1.1.0_0 (active)
xorg-libXext @1.2.0_0 (active)
xorg-libXmu @1.1.0_0 (active)
xorg-libXt @1.1.1_0 (active)
xorg-renderproto @0.11.1_0 (active)
xorg-util-macros @1.13.0_0 (active)
xorg-xcb-proto @1.6_0+python27 (active)
xorg-xcmiscproto @1.2.1_0 (active)
xorg-xextproto @7.2.0_0 (active)
xorg-xf86bigfontproto @1.2.0_0 (active)
xorg-xproto @7.0.21_0 (active)
xorg-xtrans @1.2.6_0 (active)
xpm @3.5.9_0 (active)
xrender @0.9.6_0 (active)
zlib @1.2.5_0+universal (active)
Thank you again for taking your time to think about this one.
all this shouldn't be a problem...
Will try a fresh install of OS X, Macports, and Xcode on that borrowed machine later on. If you have any thoughts on whether I should use the latest Xcode or the previous one (which is presumably still available somewhere), I'd be grateful. Otherwise, I'll just go ahead with the latest one.
Thank you again.
the latest (4.x) will cost you, the 3.x is still available from Apple'S dev corner for free. That should work.
Free is all I can afford to pay, so that settles that question - I'll go for 3.x.
Well, everyone who said this should work was absolutely right.
When I set up a clean system, with the latest Xcode 3.x, and performed the procedure described in my first message, I successfully built a portable version of current svn. I am about to try it with my patched version, but it should obviously work.
So, dominus, you are almost certainly right to say that I probably borked my main system somehow.
If anyone has any thoughts about how to to fix this, I would be very glad to hear them. Meanwhile, until Lion shows up, I'll continue to use this second system to build dosbox (as long as I can hold on to this borrowed machine).
Thanks again to everyone for their patience and help in sorting this out!
OK, this makes no sense to me at all.
I successfully built a portable SVN this morning, as described in my previous message.
When I tried to do exactly the same thing a second time, using the same copy of the source (and after running make clean), I got exactly the same errors relating to png in hardware.cpp - and nothing built. The same errors occurred whether or not I did the "sed" stuff described in my first post.
I tried again with a completely new copy of the source in a new folder (downloaded directly via svn). Once again, the same hardware.cpp png-related errors.
I restarted the machine. Same result. It seems as if simply building dosbox ONCE made it impossible to build it again. I did nothing (absolutely nothing) with port or anything else.
Does anyone have any idea what might have happened? I backed up the portable svn dosbox that I compiled the first time, so I know this worked once.
This is a clean 10.6.7 system, with the latest Xcode 3.x and newly downloaded and installed port and the three packages that dominus told me I needed.
I am totally baffled by this.
Now I'm baffled as well. With this being a new system setup, did you install anything else since the time it worked?
Maybe something got added to your ~/.profile file? copy/paste it please.
please attach config.log
I want to check why the compiler rejects the PNG stuff
Water flows down the stream
How to ask questions the smart way!
Thank you, Dominus and Qbix.
First, I didn't install any software after building dosbox. In fact, except for Xcode and MacPorts (and some automatically-installed printer drivers) I've installed nothing at all that isn't part of a default OS X installation.
BTW, I did use MobileMe to sync my OS X settings (the ones created in System Preferences) from my main machine. I wonder if that could have caused this? That would be very strange since I don't think MobileMe sync takes over anything that isn't related to display, etc., but when I start over, I will NOT synch my settings and see if that avoids the problem.
Dominus, here is my ~/.profile, presumably created when I installed MacPorts:
# MacPorts Installer addition on 2011-05-12_at_01:14:37: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
And Qbix, here are two of the config.log files that got created when I worked with two different fresh copies of svn (each was originally named config.log):
http://dl.dropbox.com/u/271144/config-svn.log
http://dl.dropbox.com/u/271144/config-svn2.log
What I may do tonight (if I get a chance, otherwise tomorrow) is start over, partition the machine on this disk with two or three partitions, install OS X, Xcode, and MacPorts in one of the partitions and make a clone of it BEFORE I try to build dosbox. Then, if this problem happens again, maybe it will be possible to see what has changed.
Thank you again for looking into this. The fact that it happens with a fresh 10.6.7, fresh Xcode, and fresh MacPorts seems to suggest that it isn't just something I'm doing wrong. (Unless it was the MobileMe sync that somehow caused this...)
MobileME sync really shouldn't impact it.
There must be something you are doing and it must be something weird 😀
Just for fun, open a new terminal window (or tab cmd+t), cd to your dosbox folder and just run (without the usual "export ..." lines):
make distclean
./configure
And look if it still gives the strange png.h message (png.h not found, using compiler something...)
Will do - but it won't be for a few hours. I partitioned the disk and am installing a clean OS X into a second partition right now, but will experiment with this one when I get back.
I know you must be right that I'm dong something weird, but I can't imagine what it might be...!
you can do the above on your other machine as well. Since they are both behaving badly in the same way it doesn't matter much which one you use
OK, back on my main machine. With a clean copy of SVN:
make distclean
./configure
make
Built a 3.2MB executable - no problems at all.
If I knew what I'm doing, this would be a clue to me - but maybe it's a clue to you!
Edit: I meant 3.2MB (not just 3.2 nothing).
(I assume you mean 3.2 as in xcode?)
That this works tells me the culprit may either be with one of the export lines, make distclean (but since you have the problem with a fresh checked out SVN as well...) or autogen.sh. So let's get to work on this:
Same as before, new terminal window and
cd (to your dosbox stuff)
make distclean
./autogen.sh
./configure
make clean
make
(and report back)
if that works then more advanced (and please, copy/paste this and add nothing more, I saw you had some other exports added before - these are the ones that WORK for me):
cd (to your dosbox stuff)
make distclean
export CFLAGS='-I/opt/local/include -O2 -arch i386'
export CXXFLAGS=$CFLAGS
export CPPFLAGS=$CXXFLAGS
export LDFLAGS='-L/opt/local/lib -O2 -arch i386'
export CC='/usr/bin/gcc-4.2 -arch i386'
export CXX='/usr/bin/g++-4.2 -arch i386'
export GCOV='/usr/bin/gcov-4.2 -arch i386'
./autogen.sh
./configure
make clean
make
(and report back)
Dominus, thank you! I can build again - but I still can't make a portable build.
First, by "3.2" in a previous message, I meant "3.2 MB", for whatever that information might be worth.
Next, working on my old, main machine, I tried your first experiment with my patched copy - it built!
Then I tried your more advanced experiment with the export statements - it built!
Finally, I tried it with my sed statements, which are supposed to create a portable version - and it built also!
But, the resulting build is not portable. When I run it on the newly-installed system on my borrowed machine, the terminal gives this message:
dyld: Library not loaded: /opt/local/lib/libpng14.14.dylib
I am going to try again on this new system when I get it updated to 10.6.7 and get Xcode and MacPorts installed, but that is where I stand now.
I think a solution is in sight. It was you who showed me how to make a portable build a few months ago, and I apologize for bothering you with this problem yet again.