Opened 14 years ago

Closed 14 years ago

#26205 closed defect (fixed)

makeicns cannot compile i386 ppc on Mac OS X 10.4 PowerPC

Reported by: 200309@… Owned by: mkae (Marko Käning)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: pixilla (Bradley Giesbrecht), sewebster@…, 200309@…, ryandesign (Ryan Carsten Schmidt)
Port: makeicns

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Read recently about makeicns and tried to compile but got an error.
What is the problem?

$ sudo port install makeicns
--->  Computing dependencies for makeicns
--->  Fetching makeicns
--->  Attempting to fetch 1.4.tar.bz2 from http://distfiles.macports.org/makeicns
--->  Verifying checksum(s) for makeicns
--->  Extracting makeicns
--->  Configuring makeicns
--->  Building makeicns
Error: Target org.macports.build returned: shell command failed
Log for makeicns is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_makeicns/main.log
Error: Status 1 encountered during processing.

Attached is the "main.log"

Attachments (12)

main.log (8.2 KB) - added by 200309@… 14 years ago.
patch-Makefile.diff (453 bytes) - added by sewebster@… 14 years ago.
patch to disable i386
patch-Makefile-i386.diff (455 bytes) - added by sewebster@… 14 years ago.
new makefile patch 1
patch-Makefile-ppc.diff (453 bytes) - added by sewebster@… 14 years ago.
new makefile patch 2
Portfile-makeicns.diff (434 bytes) - added by sewebster@… 14 years ago.
patch to Portfile using platform specific Makefile patches
Portfile (1.4 KB) - added by mkae (Marko Käning) 14 years ago.
Brad's suggestion
patch-Makefile.3.diff (467 bytes) - added by mkae (Marko Käning) 14 years ago.
Brad's suggestion
patch-Makefile.2.diff (467 bytes) - added by mkae (Marko Käning) 14 years ago.
Brad's suggestion
makeicns-ryandesign.diff (2.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 14 years ago.
proposed patch
makeicns-brad.diff (2.1 KB) - added by pixilla (Bradley Giesbrecht) 14 years ago.
Adds "make all" target to Makefile and drops build.target from Portfile
makeicns.diff (1004 bytes) - added by mkae (Marko Käning) 14 years ago.
I think this would do the trick concerning omitting the universal variant after all. Can someone please test whether it also works on other platforms as it does for me on 64bit?!
Portfile.2 (1.4 KB) - added by mkae (Marko Käning) 14 years ago.
Portfile update for makeicns version 1.5 not needing any patches anymore. Ryan could you please test the universal variant as well as on TIGER?! Thanks

Download all attachments as: .zip

Change History (56)

Changed 14 years ago by 200309@…

Attachment: main.log added

comment:1 Changed 14 years ago by sewebster@…

Looks like an architecture issue. What kind of CPU do you have? For me, to my uninformed eye, it looks like it tries to compile for ppc and i386. Maybe you only have a ppc, not an intel chip, so it doesn't work.

comment:2 Changed 14 years ago by sewebster@…

Cc: sewebster@… added

Cc Me!

comment:3 in reply to:  1 Changed 14 years ago by 200309@…

Replying to sewebster@…:

Looks like an architecture issue. What kind of CPU do you have? For me, to my uninformed eye, it looks like it tries to compile for ppc and i386. Maybe you only have a ppc, not an intel chip, so it doesn't work.

Yes, this machine is PPC.

Changed 14 years ago by sewebster@…

Attachment: patch-Makefile.diff added

patch to disable i386

comment:4 Changed 14 years ago by sewebster@…

You could try the attached patches to see if it works for you, but all I did was cut out the i386 part, so this only works for ppc users.

comment:5 Changed 14 years ago by jmroot (Joshua Root)

Cc: brad@… added
Owner: changed from macports-tickets@… to mk-macports@…
Port: makeicns added

Please remember to fill in the Port field and cc the maintainers.

comment:6 in reply to:  5 Changed 14 years ago by 200309@…

Replying to jmr@…:

Please remember to fill in the Port field and cc the maintainers.

ok... this is my first post. Any other suggestions? -Bill

comment:7 in reply to:  4 Changed 14 years ago by 200309@…

Replying to sewebster@…:

You could try the attached patches to see if it works for you, but all I did was cut out the i386 part, so this only works for ppc users.

Where do I find info about how to apply the patches?

-Bill

comment:8 Changed 14 years ago by 200309@…

Cc: 200309@… added

Cc Me!

comment:9 Changed 14 years ago by sewebster@…

Probably the easiest thing to do is to download the patch-Makefile.diff file (download link at the bottom of the diff page), then (from the directory you downloaded the patch)

sudo mkdir `port dir makeicns`/files
sudo cp patch-Makefile.diff `port dir makeicns`/files

then sudo port edit makeicns and manually make the change that you can see I made in the Portfile diff (add the patchfiles line to the bottom). Then sudo port install makeicns again and see what happens.

comment:10 in reply to:  9 Changed 14 years ago by 200309@…

Replying to sewebster@…:

Probably the easiest thing to do is to download the patch-Makefile.diff file (download link at the bottom of the diff page), then (from the directory you downloaded the patch)

sudo mkdir `port dir makeicns`/files
sudo cp patch-Makefile.diff `port dir makeicns`/files

then sudo port edit makeicns and manually make the change that you can see I made in the Portfile diff (add the patchfiles line to the bottom). Then sudo port install makeicns again and see what happens.

Thank you. That worked.

Soon, I will find out how and what makeicns can do.

-Bill

Changed 14 years ago by sewebster@…

Attachment: patch-Makefile-i386.diff added

new makefile patch 1

Changed 14 years ago by sewebster@…

Attachment: patch-Makefile-ppc.diff added

new makefile patch 2

Changed 14 years ago by sewebster@…

Attachment: Portfile-makeicns.diff added

patch to Portfile using platform specific Makefile patches

comment:11 Changed 14 years ago by sewebster@…

I uploaded a new Portfile patch and two Makefile patches. The modified Portfile applies the appropriate Makefile patch based on the platform the user is running. Could be a better way to do this. Also, no 64 bit I guess.

comment:12 in reply to:  1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Summary: makeicns compile errormakeicns cannot compile i386 ppc on Mac OS X 10.4 PowerPC

Replying to sewebster@…:

Maybe you only have a ppc, not an intel chip, so it doesn't work.

It doesn't work because the user is on Mac OS X 10.4 PowerPC, which contains only the ppc architecture; every other Mac OS X version MacPorts supports contains at least ppc and i386 architectures. If you want to compile ppc and i386 on 10.4 PowerPC you must use the MacOSX10.4u.sdk. As far as I remember, the path to the this SDK will be in the variable ${configure.universal_sysroot} for you to use if it is needed (i.e. on 10.4 PowerPC only); on all other OS the variable is empty.

The port does not have a universal variant. The software should not build universal unless the port has a universal variant and the user has selected it.

The port should build for the architecture(s) the user requested. That means examining ${configure.build_arch} or ${configure.universal_archs} depending on whether building universal or not.

If 64-bit is not supported, the port should so indicate using "supported_archs i386 ppc" and, if enabling universal builds, by setting "configure.universal_archs i386 ppc" as well.

comment:13 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:14 Changed 14 years ago by sewebster@…

It appears that this port is really a fairly minimal program... and currently doesn't even have a configure phase. I'm guessing the maintainer just set it up quickly and the result is that it doesn't work on 10.4.

comment:15 Changed 14 years ago by mkae (Marko Käning)

Here is the "maintainer". :)

I admit it was a quick setup. I don't have opportunity to test this with <10.6, actually. So, I welcome all proposals to make the portfile better, also for older versions. :)

I could patch in the latest submitted patchfiles into the current portfile if that's the way to go.

Am ready to learn how to improve this portfile.

comment:16 Changed 14 years ago by mkae (Marko Käning)

Here is what Brad (co-maintainer of this port) suggested:

With these vars it's easier to change the build without committing changes to Makefile.

I think it's perfectly acceptable to require env vars for make. That's how postfix does it. Now ./configure.

(I'll attach the corresponding patch files in a minute.)

What do you guys think about this hack?

Changed 14 years ago by mkae (Marko Käning)

Attachment: Portfile added

Brad's suggestion

Changed 14 years ago by mkae (Marko Käning)

Attachment: patch-Makefile.2.diff added

Brad's suggestion

comment:17 in reply to:  16 Changed 14 years ago by mkae (Marko Käning)

Replying to MK-MacPorts@…:

With these vars it's easier to change the build without committing changes to Makefile.

I think it's perfectly acceptable to require env vars for make. That's how postfix does it. Now ./configure.

The last bit should be "NO ./configure", actually!

comment:18 Changed 14 years ago by 200309@…

The patches sent to me by Scott Webster sewebster@gmail.com
allowed makeicns to compile on 10.4.11 PPC
--AND--
I can now make beautiful icons.
Thank you.

comment:19 Changed 14 years ago by 200309@…

I tried to compile makeicns on a MacOSX 10.5.8 PPC
It compiled without any problem.
Then tried on another MacOSX 10.4.11 PPC and it failed as per my original post.
-Bill

comment:20 Changed 14 years ago by sewebster@…

I think that "Brad's suggestion" is getting closer to the ideal, probably as described by Ryan... but it still builds universal when not requested and I don't think it will work on 10.4?

comment:21 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

I am working on a patch now.

Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: makeicns-ryandesign.diff added

proposed patch

comment:22 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

comment:23 in reply to:  20 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to sewebster@…:

I think that "Brad's suggestion" is getting closer to the ideal

"Brad's suggestion" appears to be based on the old 1.2 version of the port; we're up to 1.4 now... Try my patch instead.

Changed 14 years ago by pixilla (Bradley Giesbrecht)

Attachment: makeicns-brad.diff added

Adds "make all" target to Makefile and drops build.target from Portfile

comment:24 Changed 14 years ago by mkae (Marko Käning)

Hi folks, I just committed the suggested changes (patch for Makefile as well as the updated Portfile) as rev 70885. Hope this solves current issues eventually.

comment:25 in reply to:  24 Changed 14 years ago by 200309@…

Replying to MK-MacPorts@…:

Hi folks, I just committed the suggested changes (patch for Makefile as well as the updated Portfile) as rev 70885. Hope this solves current issues eventually.

PowerBook G3 Pismo 500MHz PPC 10.4.11 compile ok

iBook G4 1.42GHz PPC 10.5.8 compile ok

I do not have an Intel to test.

Thank you, Bill

comment:26 Changed 14 years ago by jmroot (Joshua Root)

Why are you restricting the port to only build for i386 and/or ppc?

comment:27 Changed 14 years ago by sewebster@…

Compiles and works fine x86_64 for me (I just added x86_64 to the supported_archs line).

comment:28 Changed 14 years ago by mkae (Marko Käning)

Hi, the restriction was non-intentional. Thanks to sewebster it could be proven that it works fine for 64bit, although there were doubts coming up during this discussion. (Fixed in rev. 70890.)

Thanks for all the help!

There is the thought now to completely get rid of the Makefile patch file and change makeicns' Makefile in its sources, which is probably the best idea.

comment:29 Changed 14 years ago by mkae (Marko Käning)

Actually I don't know whether it makes sense to build the program by default as universal with ppc and i386... Who actually needs that? Wouldn't it make more sense to take x86_64 and i386 nowadays? Does one need a universal variant at all?

comment:30 Changed 14 years ago by jmroot (Joshua Root)

There doesn't appear to be any reason you couldn't just remove the supported_archs and configure.universal_archs lines altogether.

comment:31 Changed 14 years ago by mkae (Marko Käning)

So, why not do it then? Thanks jmr, I'll test it and commit the change.

Changed 14 years ago by mkae (Marko Käning)

Attachment: makeicns.diff added

I think this would do the trick concerning omitting the universal variant after all. Can someone please test whether it also works on other platforms as it does for me on 64bit?!

comment:32 Changed 14 years ago by sewebster@…

If it is considered "good macports practice" to have a universal variant when possible, then you might want to leave it in...

comment:33 in reply to:  32 Changed 14 years ago by mkae (Marko Käning)

Replying to sewebster@…:

If it is considered "good macports practice" to have a universal variant when possible, then you might want to leave it in...

OK, so, how can I make the universal variant non-default? What would have to be changed in the current Portfile to achieve that the universal variant has to selected by the user, otherwise the system default would be used. Or is this also "not good" practice?

comment:34 Changed 14 years ago by mkae (Marko Käning)

Well, and which archs should be selected for the universal variant? PPC and i386? Which recommendations exist? Probably you can point me to some place in the MacPorts manual...

comment:35 Changed 14 years ago by sewebster@…

You just need to remove the supported_archs and configure.universal_archs lines as suggested above (from revision 2). Then it will use the default supported arches and universal arches. Leave the universal variant in, it won't be selected by default, but will work if users request it. The arches they build it for will depend on their preferences. This is the variants part of the guide, not sure how helpful it is to you: http://guide.macports.org/#development.variants

comment:36 Changed 14 years ago by mkae (Marko Käning)

Thanks sewebster. :)

I'll do as you say and commit it finally.

comment:37 Changed 14 years ago by mkae (Marko Käning)

Latest version in rev 70902.

comment:38 Changed 14 years ago by sewebster@…

The new version (rev 4) works for me both as x86_64 and universal (x86_64 and i386). It's nice if you can just write the revision numbers with an r in front, like this r70902 because then the wiki makes a link automatically.

comment:39 Changed 14 years ago by mkae (Marko Käning)

Thanks for keeping me posted! Concerning the revision numbering: will do next time. Thanks for the hint! Hope to get also feedback from Brad during the next hours. Would be great if 200309@… could also test it on the PPC systems...

Changed 14 years ago by mkae (Marko Käning)

Attachment: Portfile.2 added

Portfile update for makeicns version 1.5 not needing any patches anymore. Ryan could you please test the universal variant as well as on TIGER?! Thanks

comment:40 Changed 14 years ago by mkae (Marko Käning)

Owner: changed from mk-macports@… to mk@…

comment:41 Changed 14 years ago by mkae (Marko Käning)

I am wondering whether makeicns' latest update in r75880 might have solved this issue...

comment:43 Changed 14 years ago by mkae (Marko Käning)

Hopefully fixed with r75885.

comment:44 in reply to:  43 Changed 14 years ago by 200309@…

Replying to mk@…:

Hopefully fixed with r75885.

MacOSX 10.4.11 PowerBook G3 Pismo 500MHz

Thank you... makeicns now compiles! -Bill

20110211.222751
Portfile changed since last build; discarding previous state.
--->  Fetching makeicns
--->  Attempting to fetch makeicns-1.4.2.tar.bz2 from http://distfiles.macports.org/makeicns
--->  Verifying checksum(s) for makeicns
--->  Extracting makeicns
--->  Configuring makeicns
--->  Building makeicns
--->  Staging makeicns into destroot
--->  Installing makeicns @1.4.2_0
--->  Deactivating makeicns @1.4_5
--->  Cleaning makeicns
--->  Activating makeicns @1.4.2_0
--->  Cleaning makeicns
--->  Uninstalling makeicns @1.4_5
--->  Cleaning makeicns

comment:45 Changed 14 years ago by mkae (Marko Käning)

Resolution: fixed
Status: newclosed

Great. So I'll close this ticket then. Thanks again to Ryan who's patch brought the breakthrough! :-)

Note: See TracTickets for help on using tickets.