Opened 10 years ago

Closed 10 years ago

#44145 closed update (fixed)

Pythia : Version bump + respect C++ runtime settings

Reported by: cjones051073 (Chris Jones) Owned by: mattiafrancescomoro@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: mojca (Mojca Miklavec), cooljeanius (Eric Gallager)
Port: pythia

Description

Hi,

The attached diff updates Pythia to the latest version. It also fixes an issue where the port was not fully respecting the c++ runtime settings (for instance if the user was forcing the use of libc++, on pre-Mavericks systems).

cheers Chris

Attachments (1)

pythia.diff (1.7 KB) - added by cjones051073 (Chris Jones) 10 years ago.

Download all attachments as: .zip

Change History (18)

Changed 10 years ago by cjones051073 (Chris Jones)

Attachment: pythia.diff added

comment:1 Changed 10 years ago by mojca (Mojca Miklavec)

Cc: mattiafrancescomoro@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to mattiafrancescomoro@…
Version: 2.3.0

comment:2 Changed 10 years ago by mojca (Mojca Miklavec)

Cc: mojca@… added

Cc Me!

comment:3 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 10 years ago by cjones051073 (Chris Jones)

Ping ...

comment:5 Changed 10 years ago by mojca (Mojca Miklavec)

Does the following work for you? (To avoid one extra "if"?)

build.args          CC=${configure.cc} \
                    CXX="${configure.cxx} -stdlib=${configure.cxx_stdlib}"

Just curious: why do you need configure.args-append as opposed to just configure.args?

Also: your patch doesn't apply cleanly here, but no need to upload a new one this time.

comment:6 in reply to:  5 ; Changed 10 years ago by cjones051073 (Chris Jones)

Replying to mojca@…:

Does the following work for you? (To avoid one extra "if"?)

build.args          CC=${configure.cc} \
                    CXX="${configure.cxx} -stdlib=${configure.cxx_stdlib}"

I already tried that, and various permutations on the same theme. The bottom line is the pythia makefile is pretty funky, and does support many things you would expect. The only way I was able to get it working was with my patch as provided, which forcibly adds the -stdlib setting to the CXX variable. This seems the only thing the makefile really respects...

Just curious: why do you need configure.args-append as opposed to just configure.args?

To not override any settings coming from elsewhere. To put the question back, why not use append ?

Chris

Also: your patch doesn't apply cleanly here, but no need to upload a new one this time.

comment:7 in reply to:  5 Changed 10 years ago by cjones051073 (Chris Jones)

Also: your patch doesn't apply cleanly here, but no need to upload a new one this time.

No idea about that, it was based on the SVN head at the time I submitted it. Are you sure your local copy is up to date with SVN ?

comment:8 in reply to:  6 ; Changed 10 years ago by mojca (Mojca Miklavec)

Replying to jonesc@…:

Replying to mojca@…:

Does the following work for you? (To avoid one extra "if"?)

build.args          CC=${configure.cc} \
                    CXX="${configure.cxx} -stdlib=${configure.cxx_stdlib}"

I already tried that, and various permutations on the same theme.

But how is your patch effectively different from my proposal (other than the fact that my proposal would also add -stdbil=libstdc++ even when that's the default)?

I don't understand when your patch would work and mine wouldn't.

The bottom line is the pythia makefile is pretty funky

Is there any chance to ask them to improve the situation a bit?

Just curious: why do you need configure.args-append as opposed to just configure.args?

To not override any settings coming from elsewhere. To put the question back, why not use append ?

I was curious whether the absence of -append actually broke anything for you.

I might be wrong, but I would say that append should be used only when there is a reason for it. (Or else change that in all ports.)

comment:9 in reply to:  8 ; Changed 10 years ago by cjones051073 (Chris Jones)

Replying to mojca@…:

Replying to jonesc@…:

Replying to mojca@…:

Does the following work for you? (To avoid one extra "if"?)

build.args          CC=${configure.cc} \
                    CXX="${configure.cxx} -stdlib=${configure.cxx_stdlib}"

I already tried that, and various permutations on the same theme.

But how is your patch effectively different from my proposal (other than the fact that my proposal would also add -stdbil=libstdc++ even when that's the default)?

I don't understand when your patch would work and mine wouldn't.

They do different things. Look carefully at mine, I redefine the CXX env var. Yours does not.

The bottom line is the pythia makefile is pretty funky

Is there any chance to ask them to improve the situation a bit?

Highly unlikely. I am not enough of a pythia user to really have the energy to go down that route just now ...

Just curious: why do you need configure.args-append as opposed to just configure.args?

To not override any settings coming from elsewhere. To put the question back, why not use append ?

I was curious whether the absence of -append actually broke anything for you.

I might be wrong, but I would say that append should be used only when there is a reason for it. (Or else change that in all ports.)

OK

comment:10 in reply to:  9 Changed 10 years ago by cjones051073 (Chris Jones)

Replying to jonesc@…:

Replying to mojca@…:

Replying to jonesc@…:

Replying to mojca@…:

Does the following work for you? (To avoid one extra "if"?)

build.args          CC=${configure.cc} \
                    CXX="${configure.cxx} -stdlib=${configure.cxx_stdlib}"

I already tried that, and various permutations on the same theme.

But how is your patch effectively different from my proposal (other than the fact that my proposal would also add -stdbil=libstdc++ even when that's the default)?

I don't understand when your patch would work and mine wouldn't.

They do different things. Look carefully at mine, I redefine the CXX env var. Yours does not.

Sorry... Not enough coffee this morning...

I just realised I had cut and pasted your proposal incorrectly.

yes, I do eventually agree, yours should do the same, as add -stdbil=libstdc++ as well. That should be fine...

Chris

comment:11 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

Committed in r121647 as maintainer timeout.

comment:12 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: closedreopened

Ah, OK, it seems that I did break something:

/usr/bin/g++-4.2 -stdlib=libstdc++ -O2 -ansi -pedantic -W -Wall -Wshadow -c -Iinclude src/FJcore.cc -o tmp/archive/FJcore.o
cc1plus: error: unrecognized command line option "-stdlib=libstdc++"

See:

I need help to properly handle that.

comment:13 in reply to:  12 Changed 10 years ago by cjones051073 (Chris Jones)

Replying to mojca@…:

Ah, OK, it seems that I did break something:

/usr/bin/g++-4.2 -stdlib=libstdc++ -O2 -ansi -pedantic -W -Wall -Wshadow -c -Iinclude src/FJcore.cc -o tmp/archive/FJcore.o
cc1plus: error: unrecognized command line option "-stdlib=libstdc++"

See:

I need help to properly handle that.

Maybe my original if statement is not so bad after all ;)

comment:14 Changed 10 years ago by mojca (Mojca Miklavec)

OK, I can fix that. But this means that we probably have a "deeper problem" somewhere anyway.

Just before I do another mistake: is there any difference between CXX="${configure.cxx} -stdlib=libc++" and CXX=${configure.cxx}" -stdlib=libc++"?

comment:15 in reply to:  14 Changed 10 years ago by cjones051073 (Chris Jones)

Replying to mojca@…:

OK, I can fix that. But this means that we probably have a "deeper problem" somewhere anyway.

Just before I do another mistake: is there any difference between CXX="${configure.cxx} -stdlib=libc++" and CXX=${configure.cxx}" -stdlib=libc++"?

No idea... The second is the one I tested...

comment:16 Changed 10 years ago by mojca (Mojca Miklavec)

I now committed r121649.

comment:17 Changed 10 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.